]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
Remove oils_persist:tablename attribute from class "circbyyr", since
[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                 </fields>
88         </class>
89
90         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
91                 <fields>
92                         <field name="err_msg" oils_persist:virtual="true" />
93                         <field name="type" oils_persist:virtual="true" />
94                 </fields>
95         </class>
96
97         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
98                 <fields>
99                         <field name="err_msg" oils_persist:virtual="true" />
100                         <field name="type" oils_persist:virtual="true" />
101                 </fields>
102         </class>
103
104         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
105                 <fields oils_persist:primary="matchpoint">
106                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
107                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
108                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
109                 </fields>
110                 <links>
111                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
112                 </links>
113         </class>
114
115
116         <!-- Actually in the DB -->
117         <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">
118                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
119                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
120                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
121                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
122                 </fields>
123                 <links>
124                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
125                 </links>
126                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
127                         <actions>
128                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
129                                 <retrieve permission="CREATE_IMPORT_TRASH_FIELD UPDATE_IMPORT_TRASH_FIELD DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
130                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
131                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
132                         </actions>
133                 </permacrud>
134         </class>
135
136         <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 Attribute Definition">
137                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
138                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
139                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
140                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
141                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
142                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
143                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
144                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
145                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
146                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
147                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
148                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
149                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
150                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
151                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
152                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
153                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
154                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
155                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
156                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
157                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
158                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
159                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
160                 </fields>
161                 <links>
162                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
163                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
164                 </links>
165                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
166                         <actions>
167                                 <create permission="CREATE_IMPORT_ITEM">
168                     <context link="definition" field="owner"/>
169                                 </create>
170                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
171                     <context link="definition" field="owner"/>
172                                 </retrieve>
173                                 <update permission="UPDATE_IMPORT_ITEM">
174                     <context link="definition" field="owner"/>
175                                 </update>
176                                 <delete permission="DELETE_IMPORT_ITEM">
177                     <context link="definition" field="owner"/>
178                                 </delete>
179                         </actions>
180                 </permacrud>
181         </class>
182
183         <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">
184                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
185                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
186                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
187                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
188                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
189                         <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>
190                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
191                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
192                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
193                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
194                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
195                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
196                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
197                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
198                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
199                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
200                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
201                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
202                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
203                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
204                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
205                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
206                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
207                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
208                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
209                 </fields>
210                 <links>
211                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
212                 </links>
213                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
214                         <actions>
215                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
216                                 <retrieve permission="CREATE_IMPORT_ITEM_ATTR_DEF UPDATE_IMPORT_ITEM_ATTR_DEF DELETE_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
217                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
218                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
219                         </actions>
220                 </permacrud>
221         </class>
222
223         <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">
224                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
225                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
226                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
227                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
228                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
229                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
230                 </fields>
231                 <links>
232                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
233                 </links>
234                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
235                         <actions>
236                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
237                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
238                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
239                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
240                         </actions>
241                 </permacrud>
242         </class>
243
244         <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">
245                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
246                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
247                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
248                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
249                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
250                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
251                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
252                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
253                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
254                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="text"/>
255                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="text"/>
256                 </fields>
257                 <links>
258                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
259                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
260                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
261             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
262             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
263                 </links>
264                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
265                         <actions>
266                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
267                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
268                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
269                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
270                         </actions>
271                 </permacrud>
272         </class>
273
274         <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">
275                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
276                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
277                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
278                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
279                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
280                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
281                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
282                 </fields>
283                 <links/>
284                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
285                         <actions>
286                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
287                 <retrieve/>
288                 <!--
289                                 <retrieve permission="CREATE_BIB_IMPORT_IMPORT_FIELD_DEF UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
290                 -->
291                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
292                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
293                         </actions>
294                 </permacrud>
295         </class>
296
297         <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">
298                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
299                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
300                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
301                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
302                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
303                 </fields>
304                 <links>
305                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
306                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
307                 </links>
308                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
309                         <actions>
310                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
311                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
312                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
313                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
314                         </actions>
315                 </permacrud>
316         </class>
317
318         <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">
319                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
320                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
321                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
322                         <field reporter:label="Matched Attribute" name="matched_attr" reporter:datatype="link"/>
323                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
324                         <field reporter:label="Field Type" name="field_type" reporter:datatype="text"/>
325                 </fields>
326                 <links>
327                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
328                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
329                         <link field="matched_attr" reltype="has_a" key="id" map="" class="vqbra"/>
330                 </links>
331                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
332                         <actions>
333                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
334                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
335                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
336                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
337                         </actions>
338                 </permacrud>
339         </class>
340
341         <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">
342                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
343                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
344                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
345                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
346                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
347                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
348                 </fields>
349                 <links>
350                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
351                 </links>
352                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
353                         <actions>
354                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
355                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
356                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
357                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
358                         </actions>
359                 </permacrud>
360         </class>
361
362         <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">
363                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
364                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
365                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
366                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
367                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
368                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
369                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
370                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
371                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="text"/>
372                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="text"/>
373                 </fields>
374                 <links>
375                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
376                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
377             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
378             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
379                 </links>
380                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
381                         <actions>
382                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
383                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
384                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
385                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
386                         </actions>
387                 </permacrud>
388         </class>
389
390         <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">
391                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
392                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
393                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
394                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
395                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
396                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
397                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
398                 </fields>
399                 <links/>
400                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
401                         <actions>
402                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
403                 <retrieve/>
404                 <!--
405                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
406                 -->
407                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
408                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
409                         </actions>
410                 </permacrud>
411         </class>
412
413         <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">
414                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
415                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
416                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
417                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
418                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
419                 </fields>
420                 <links>
421                         <link field="record" reltype="has_a" key="id" map="" class="vaqr"/>
422                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
423                 </links>
424                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
425                         <actions>
426                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
427                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
428                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
429                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
430                         </actions>
431                 </permacrud>
432         </class>
433
434         <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">
435                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
436                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
437                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
438                         <field reporter:label="Matched Attribute" name="matched_attr" reporter:datatype="link"/>
439                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
440                 </fields>
441                 <links>
442                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
443                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
444                         <link field="matched_attr" reltype="has_a" key="id" map="" class="vqbra"/>
445                 </links>
446                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
447                         <actions>
448                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
449                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
450                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
451                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
452                         </actions>
453                 </permacrud>
454         </class>
455
456
457         <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">
458                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
459                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
460                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
461                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
462                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
463                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
464                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
465                 </fields>
466                 <links>
467                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
468                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
469                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
470                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
471                 </links>
472         </class>
473
474     <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">
475         <fields oils_persist:primary="name">
476             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
477             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
478             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
479             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
480             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
481             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
482             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
483             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
484             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
485         </fields>
486         <links>
487             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
488         </links>
489         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
490             <actions>
491                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
492                 <retrieve/>
493                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
494                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
495             </actions>
496         </permacrud>
497     </class>
498
499     <class id="cza" controller="open-ils.cstore" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
500         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
501             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id"/>
502             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
503             <field reporter:label="Name" name="name" reporter:datatype="text"/>
504             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
505             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
506             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
507             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
508         </fields>
509         <links>
510             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
511         </links>
512     </class>
513
514         <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">
515                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
516                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
517                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
518                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
519                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
520                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
521                         <field reporter:label="Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
522                 </fields>
523                 <links>
524             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
525             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
526                 </links>
527                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
528                         <actions>
529                                 <retrieve/>
530                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
531                         </actions>
532                 </permacrud>
533         </class>
534
535         <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">
536                 <fields oils_persist:primary="key">
537                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
538                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
539                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
540                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
541                 </fields>
542                 <links/>
543                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
544                         <actions>
545                                 <create permission="ADMIN_TRIGGER_HOOK" global_required="true"/>
546                                 <retrieve/>
547                                 <update permission="ADMIN_TRIGGER_HOOK" global_required="true"/>
548                                 <delete permission="ADMIN_TRIGGER_HOOK" global_required="true"/>
549                         </actions>
550                 </permacrud>
551         </class>
552
553         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
554                 <fields oils_persist:primary="module">
555                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
556                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
557                 </fields>
558                 <links/>
559         </class>
560
561         <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">
562                 <fields oils_persist:primary="module">
563                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
564                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
565                 </fields>
566                 <links/>
567                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
568                         <actions>
569                                 <create permission="ADMIN_TRIGGER_VALIDATOR" global_required="true"/>
570                                 <retrieve/>
571                                 <update permission="ADMIN_TRIGGER_VALIDATOR" global_required="true"/>
572                                 <delete permission="ADMIN_TRIGGER_VALIDATOR" global_required="true"/>
573                         </actions>
574                 </permacrud>
575         </class>
576
577         <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">
578                 <fields oils_persist:primary="module">
579                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
580                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
581                 </fields>
582                 <links/>
583                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
584                         <actions>
585                                 <create permission="ADMIN_TRIGGER_REACTOR" global_required="true"/>
586                                 <retrieve/>
587                                 <update permission="ADMIN_TRIGGER_REACTOR" global_required="true"/>
588                                 <delete permission="ADMIN_TRIGGER_REACTOR" global_required="true"/>
589                         </actions>
590                 </permacrud>
591         </class>
592
593         <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">
594                 <fields oils_persist:primary="module">
595                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
596                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
597                 </fields>
598                 <links/>
599                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
600                         <actions>
601                                 <create permission="ADMIN_TRIGGER_CLEANUP" global_required="true"/>
602                                 <retrieve/>
603                                 <update permission="ADMIN_TRIGGER_CLEANUP" global_required="true"/>
604                                 <delete permission="ADMIN_TRIGGER_CLEANUP" global_required="true"/>
605                         </actions>
606                 </permacrud>
607         </class>
608
609         <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">
610                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
611                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
612                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
613                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
614                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
615                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
616                 </fields>
617                 <links>
618                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
619                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
620                 </links>
621                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
622                         <actions>
623                                 <create permission="ADMIN_TRIGGER_EVENT_DEF">
624                     <context link="event_def" field="owner"/>
625                 </create>
626                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF">
627                     <context link="event_def" field="owner"/>
628                 </retrieve>
629                                 <update permission="ADMIN_TRIGGER_EVENT_DEF">
630                     <context link="event_def" field="owner"/>
631                 </update>
632                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF">
633                     <context link="event_def" field="owner"/>
634                 </delete>
635                         </actions>
636                 </permacrud>
637         </class>
638
639         <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">
640                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
641                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
642                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
643                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
644                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
645                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
646                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
647                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
648                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
649                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
650                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
651                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
652                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
653                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
654                         <field reporter:label="Environmet Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
655                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
656                 </fields>
657                 <links>
658                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
659                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
660                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
661                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
662                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
663                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
664                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
665                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
666                 </links>
667                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
668                         <actions>
669                                 <create permission="ADMIN_TRIGGER_EVENT_DEF" context_field="owner"/>
670                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF" context_field="owner"/>
671                                 <update permission="ADMIN_TRIGGER_EVENT_DEF" context_field="owner"/>
672                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF" context_field="owner"/>
673                         </actions>
674                 </permacrud>
675         </class>
676
677         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
678                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
679                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
680                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
681                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
682                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
683                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
684                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
685                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
686                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
687                         <field reporter:label="State" name="state" reporter:datatype="text"/>
688                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
689                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
690                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
691                 </fields>
692                 <links>
693                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
694                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
695                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
696                 </links>
697         </class>
698
699         <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">
700                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
701                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
702                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
703                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
704                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
705                 </fields>
706                 <links>
707                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
708                 </links>
709                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
710                         <actions>
711                                 <create permission="ADMIN_TRIGGER_EVENT_DEF">
712                     <context link="event_def" field="owner"/>
713                 </create>
714                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF">
715                     <context link="event_def" field="owner"/>
716                 </retrieve>
717                                 <update permission="ADMIN_TRIGGER_EVENT_DEF">
718                     <context link="event_def" field="owner"/>
719                 </update>
720                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF">
721                     <context link="event_def" field="owner"/>
722                 </delete>
723                         </actions>
724                 </permacrud>
725         </class>
726
727         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
728                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
729                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
730                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
731                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
732                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
733                 </fields>
734                 <links>
735                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
736                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
737                         <link field="circulation_checkins" reltype="has_many" key="checkin_workstation" map="" class="circ"/>
738                 </links>
739         </class>
740
741         <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">
742                 <fields oils_persist:primary="code">
743                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
744                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
745                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
746                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
747                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
748                 </fields>
749                 <links/>
750         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
751             <actions>
752                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
753                 <retrieve/>
754                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
755                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
756             </actions>
757         </permacrud>
758         </class>
759
760         <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">
761                 <fields oils_persist:primary="code">
762                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
763                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
764                 </fields>
765                 <links/>
766         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
767             <actions>
768                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
769                 <retrieve permission="CREATE_COPY_BTYPE UPDATE_COPY_BTYPE DELETE_COPY_BTYPE" global_required="true"/>
770                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
771                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
772             </actions>
773         </permacrud>
774         </class>
775
776         <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">
777                 <fields oils_persist:primary="code">
778                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
779                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
780                 </fields>
781                 <links/>
782         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
783             <actions>
784                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
785                 <retrieve permission="CREATE_CN_BTYPE UPDATE_CN_BTYPE DELETE_CN_BTYPE" global_required="true"/>
786                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
787                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
788             </actions>
789         </permacrud>
790         </class>
791
792         <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">
793                 <fields oils_persist:primary="code">
794                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
795                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
796                 </fields>
797                 <links/>
798         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
799             <actions>
800                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
801                 <retrieve permission="CREATE_BIB_BTYPE UPDATE_BIB_BTYPE DELETE_BIB_BTYPE" global_required="true"/>
802                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
803                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
804             </actions>
805         </permacrud>
806         </class>
807
808         <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">
809                 <fields oils_persist:primary="code">
810                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
811                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
812                 </fields>
813                 <links/>
814         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
815             <actions>
816                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
817                 <retrieve permission="CREATE_USER_BTYPE UPDATE_USER_BTYPE DELETE_USER_BTYPE" global_required="true"/>
818                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
819                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
820             </actions>
821         </permacrud>
822         </class>
823
824         <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">
825                 <fields oils_persist:primary="code">
826                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
827                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
828                 </fields>
829                 <links/>
830         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
831             <actions>
832                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
833                 <retrieve/>
834                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
835                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
836             </actions>
837         </permacrud>
838         </class>
839
840         <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">
841                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
842                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
843                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
844                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
845                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
846                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
847                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
848                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
849                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
850                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
851                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
852                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
853                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
854                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
855                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
856                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
857                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
858                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
859                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
860                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
861                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
862                 </fields>
863                 <links>
864                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
865                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
866                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
867                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
868                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
869                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
870                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
871                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
872                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
873                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
874                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
875                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
876             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
877                 </links>
878         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
879             <actions>
880                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
881                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
882                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
883                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
884             </actions>
885         </permacrud>
886         </class>
887
888         <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">
889                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
890                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
891                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
892                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
893                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link"/>
894                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
895                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
896                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
897                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
898                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
899                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
900                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
901                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
902                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
903                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
904                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
905                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
906                 </fields>
907                 <links>
908                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
909                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
910                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
911                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
912                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
913                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
914                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
915                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
916                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
917                 </links>
918         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
919             <actions>
920                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
921                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
922                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
923                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
924             </actions>
925         </permacrud>
926         </class>
927
928         <class id="ccmcmt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_circ_mod_test" oils_persist:tablename="config.circ_matrix_circ_mod_test" reporter:label="Circulation Matrix Circulation Modifier Subtest">
929                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_id_seq">
930                         <field reporter:label="Test ID" name="id" reporter:datatype="id"/>
931                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="link"/>
932                         <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
933                 </fields>
934                 <links>
935                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
936                 </links>
937         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
938             <actions>
939                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
940                     <context link="matchpoint" field="org_unit"/>
941                 </create>
942                 <retrieve/>
943                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
944                     <context link="matchpoint" field="org_unit"/>
945                 </update>
946                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
947                     <context link="matchpoint" field="org_unit"/>
948                 </delete>
949             </actions>
950         </permacrud>
951         </class>
952
953         <class id="ccmcmtm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_circ_mod_test_map" oils_persist:tablename="config.circ_matrix_circ_mod_test_map" reporter:label="Circulation Matrix Circulation Modifier Subtest Circulation Modifier Set">
954                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_map_id_seq">
955                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
956                         <field reporter:label="Circulation Modifier Subtest ID" name="circ_mod_test" reporter:datatype="link"/>
957                         <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
958                 </fields>
959                 <links>
960                         <link field="circ_mod_test" reltype="has_a" key="id" map="" class="ccmcmt"/>
961                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
962                 </links>
963         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
964             <actions>
965                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
966                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
967                 </create>
968                 <retrieve/>
969                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
970                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
971                 </update>
972                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
973                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
974                 </delete>
975             </actions>
976         </permacrud>
977         </class>
978
979         <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">
980                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
981                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
982                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
983                 </fields>
984                 <links/>
985         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
986             <actions>
987                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
988                 <retrieve/>
989                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
990                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
991             </actions>
992         </permacrud>
993         </class>
994
995         <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">
996                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
997                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
998                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
999                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1000                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1001                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1002                 </fields>
1003                 <links>
1004                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1005                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1006                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1007                 </links>
1008         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1009             <actions>
1010                 <create permission="ADMIN_SURVEY">
1011                     <context link="survey" field="owner"/>
1012                 </create>
1013                 <retrieve/>
1014                 <update permission="ADMIN_SURVEY">
1015                     <context link="survey" field="owner"/>
1016                 </update>
1017                 <delete permission="ADMIN_SURVEY">
1018                     <context link="survey" field="owner"/>
1019                 </delete>
1020             </actions>
1021         </permacrud>
1022         </class>
1023         <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">
1024                 <fields oils_persist:primary="id" oils_persist:sequence="">
1025                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1026                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1027                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1028                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1029                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1030                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1031                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1032                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1033                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1034                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1035                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1036                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1037                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1038                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1039                 </fields>
1040                 <links>
1041                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1042                 </links>
1043         </class>
1044         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1045                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1046                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1047                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1048                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1049                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1050                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1051                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1052                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1053                 </fields>
1054                 <links>
1055                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1056                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1057                 </links>
1058         </class>
1059         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1060                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1061                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1062                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
1063                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1064                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1065                 </fields>
1066                 <links>
1067                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1068                 </links>
1069         </class>
1070         <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">
1071                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1072                         <field name="field" reporter:datatype="link"/>
1073                         <field name="id" reporter:datatype="id" />
1074                         <field name="source" reporter:datatype="link"/>
1075                         <field name="value" reporter:datatype="text"/>
1076                 </fields>
1077                 <links>
1078                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1079                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1080                 </links>
1081         </class>
1082         <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">
1083                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1084                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1085                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1086                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1087                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1088                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1089                 </fields>
1090                 <links>
1091                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1092                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1093                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1094                 </links>
1095         </class>
1096         <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">
1097                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1098                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1099                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1100                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1101                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1102                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1103                 </fields>
1104                 <links>
1105                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1106                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1107                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1108                 </links>
1109         </class>
1110         <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">
1111                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
1112                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
1113                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
1114                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
1115                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
1116                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
1117                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
1118                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
1119                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
1120                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
1121                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
1122                 </fields>
1123                 <links>
1124                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
1125                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
1126                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
1127                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
1128                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1129                 </links>
1130         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1131             <actions>
1132                 <create permission="TRANSIT_COPY" context_field="owner">
1133                     <context link="target_copy" field="circ_lib"/>
1134                 </create>
1135                 <retrieve/>
1136                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
1137                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
1138             </actions>
1139         </permacrud>
1140         </class>
1141         <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">
1142                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
1143                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
1144                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
1145                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
1146                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
1147                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
1148                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
1149                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1150                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
1151                 </fields>
1152                 <links>
1153                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
1154                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1155                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
1156                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1157                 </links>
1158         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1159             <actions>
1160                 <create permission="ADMIN_SURVEY">
1161                     <context link="survey" field="owner"/>
1162                 </create>
1163                 <retrieve/>
1164                 <update permission="ADMIN_SURVEY">
1165                     <context link="survey" field="owner"/>
1166                 </update>
1167                 <delete permission="ADMIN_SURVEY">
1168                     <context link="survey" field="owner"/>
1169                 </delete>
1170             </actions>
1171         </permacrud>
1172         </class>
1173         <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">
1174                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
1175                         <field name="bucket" />
1176                         <field name="id" reporter:datatype="id" />
1177                         <field name="target_copy" reporter:datatype="link"/>
1178                         <field name="create_time" reporter:datatype="timestamp" />
1179                         <field name="pos" reporter:datatype="int" />
1180                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
1181                 </fields>
1182                 <links>
1183                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1184                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
1185             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
1186                 </links>
1187         </class>
1188         <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">
1189                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
1190                         <field name="id" reporter:datatype="id" />
1191                         <field name="item" reporter:datatype="link"/>
1192                         <field name="note" reporter:datatype="text" />
1193                 </fields>
1194                 <links>
1195                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
1196                 </links>
1197         </class>
1198         <class id="are" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_entry" oils_persist:tablename="authority.record_entry" reporter:label="Authority Record Entry">
1199                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
1200                         <field name="active" reporter:datatype="bool"/>
1201                         <field name="arn_source" />
1202                         <field name="arn_value" />
1203                         <field name="create_date" reporter:datatype="timestamp"/>
1204                         <field name="creator" />
1205                         <field name="deleted" reporter:datatype="bool"/>
1206                         <field name="edit_date" reporter:datatype="timestamp"/>
1207                         <field name="editor" />
1208                         <field name="id" reporter:datatype="id" />
1209                         <field name="last_xact_id" />
1210                         <field name="marc" />
1211                         <field name="source" />
1212                         <field name="fixed_fields" oils_persist:virtual="true" />
1213                         <field name="notes" oils_persist:virtual="true" />
1214                 </fields>
1215                 <links>
1216                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1217                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1218                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
1219                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
1220                 </links>
1221         </class>
1222         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
1223                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
1224                         <field name="char_encoding" />
1225                         <field name="id" />
1226                         <field name="record" />
1227                         <field name="record_status" />
1228                 </fields>
1229                 <links>
1230                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
1231                 </links>
1232         </class>
1233         <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">
1234                 <fields oils_persist:primary="code" oils_persist:sequence="">
1235                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1236                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1237                 </fields>
1238                 <links/>
1239         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1240             <actions>
1241                 <create permission="CREATE_MARC_CODE" global_required="true"/>
1242                 <retrieve permission="CREATE_MARC_CODE UPDATE_MARC_CODE DELETE_MARC_CODE" global_required="true"/>
1243                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1244                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1245             </actions>
1246         </permacrud>
1247         </class>
1248         <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">
1249                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
1250                         <field name="accepting_usr" />
1251                         <field name="amount" reporter:datatype="money" />
1252                         <field name="amount_collected" reporter:datatype="money" />
1253                         <field name="approval_code" reporter:datatype="text"/>
1254                         <field name="cash_drawer" reporter:datatype="link"/>
1255                         <field name="cc_number" reporter:datatype="text"/>
1256                         <field name="cc_type" reporter:datatype="text"/>
1257                         <field name="expire_month" reporter:datatype="int" />
1258                         <field name="expire_year" reporter:datatype="int" />
1259                         <field name="id" reporter:datatype="id" />
1260                         <field name="note" reporter:datatype="text"/>
1261                         <field name="payment_ts" reporter:datatype="timestamp"/>
1262                         <field name="xact" reporter:datatype="link"/>
1263                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
1264                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
1265                 </fields>
1266                 <links>
1267                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
1268                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
1269                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
1270                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
1271                 </links>
1272         </class>
1273         <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">
1274                 <fields oils_persist:primary="name">
1275                         <field name="field_class" />
1276                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1277                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
1278                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
1279                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
1280                 </fields>
1281                 <links/>
1282         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1283             <actions>
1284                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
1285                 <retrieve/>
1286                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
1287                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
1288             </actions>
1289         </permacrud>
1290         </class>
1291         <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">
1292                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
1293                         <field name="field_class" />
1294                         <field name="id" reporter:datatype="id" />
1295                         <field name="name" reporter:datatype="text"/>
1296                         <field name="xpath" reporter:datatype="text"/>
1297                         <field name="weight" reporter:datatype="int" />
1298                         <field name="format" reporter:datatype="link"/>
1299                         <field name="search_field" reporter:datatype="bool" />
1300                         <field name="facet_field" reporter:datatype="bool" />
1301                 </fields>
1302                 <links/>
1303         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1304             <actions>
1305                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
1306                 <retrieve/>
1307                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
1308                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
1309             </actions>
1310         </permacrud>
1311         </class>
1312         <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">
1313                 <fields oils_persist:primary="code" oils_persist:sequence="">
1314                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1315                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1316                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
1317                 </fields>
1318                 <links/>
1319         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1320             <actions>
1321                 <create permission="CREATE_MARC_CODE" global_required="true"/>
1322                 <retrieve permission="CREATE_MARC_CODE UPDATE_MARC_CODE DELETE_MARC_CODE" global_required="true"/>
1323                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1324                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1325             </actions>
1326         </permacrud>
1327         </class>
1328         <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">
1329                 <fields oils_persist:primary="code" oils_persist:sequence="">
1330                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1331                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
1332                 </fields>
1333                 <links/>
1334         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1335             <actions>
1336                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1337                 <retrieve/>
1338                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1339                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1340             </actions>
1341         </permacrud>
1342         </class>
1343         <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">
1344                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
1345                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
1346                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
1347                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
1348                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
1349                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
1350                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
1351                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
1352                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
1353                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1354                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
1355                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1356                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
1357                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
1358                 </fields>
1359                 <links>
1360                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1361                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1362                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
1363                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1364                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
1365                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
1366                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
1367                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
1368                 </links>
1369         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1370             <actions>
1371                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
1372                 <retrieve/>
1373                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
1374                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
1375             </actions>
1376         </permacrud>
1377         </class>
1378         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
1379                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
1380                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
1381                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
1382                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1383                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
1384                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1385                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
1386                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
1387                 </fields>
1388                 <links>
1389                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
1390                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
1391         </links>
1392         </class>
1393         <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">
1394                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
1395                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1396                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
1397                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
1398                 </fields>
1399                 <links>
1400                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
1401                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
1402                 </links>
1403         </class>
1404         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
1405                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
1406                         <field name="id" reporter:datatype="id" />
1407                         <field name="value" oils_persist:i18n="true" />
1408                 </fields>
1409                 <links/>
1410         </class>
1411         <class id="mous" controller="open-ils.cstore" oils_obj:fieldmapper="money::open_user_summary" oils_persist:tablename="money.open_usr_summary" reporter:label="Open User Summary">
1412                 <fields oils_persist:primary="usr" oils_persist:sequence="">
1413                         <field name="balance_owed" reporter:datatype="money" />
1414                         <field name="total_owed" reporter:datatype="money" />
1415                         <field name="total_paid" reporter:datatype="money" />
1416                         <field name="usr" reporter:datatype="link"/>
1417                 </fields>
1418                 <links/>
1419         </class>
1420         <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">
1421                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
1422                         <field name="collector" />
1423                         <field name="enter_time" reporter:datatype="timestamp"/>
1424                         <field name="id" reporter:datatype="id" />
1425                         <field name="location" reporter:datatype="link"/>
1426                         <field name="usr" reporter:datatype="link"/>
1427                 </fields>
1428                 <links>
1429                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1430                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
1431                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
1432                 </links>
1433         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1434             <actions>
1435                 <create permission="money.collections_tracker.create" context_field="location"/>
1436                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
1437                 <delete permission="money.collections_tracker.create" context_field="location"/>
1438             </actions>
1439         </permacrud>
1440         </class>
1441         <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">
1442                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
1443                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
1444                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
1445                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
1446                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1447                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
1448                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
1449                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
1450                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
1451                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
1452                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
1453                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
1454                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
1455                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
1456                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
1457                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
1458                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
1459                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
1460                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
1461                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1462                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1463                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1464                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1465                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1466                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1467                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1468                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
1469                 </fields>
1470                 <links>
1471                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1472                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1473                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
1474                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
1475                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
1476                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
1477                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
1478                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
1479                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
1480                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
1481                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
1482                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
1483                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
1484                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
1485                 </links>
1486         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1487             <actions>
1488                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
1489                 <retrieve/>
1490                 <update permission="UPDATE_MARC" global_required="true"/>
1491             </actions>
1492         </permacrud>
1493         </class>
1494         <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">
1495                 <fields oils_persist:primary="id" oils_persist:sequence="">
1496                         <field name="dow_0_close" />
1497                         <field name="dow_0_open" />
1498                         <field name="dow_1_close" />
1499                         <field name="dow_1_open" />
1500                         <field name="dow_2_close" />
1501                         <field name="dow_2_open" />
1502                         <field name="dow_3_close" />
1503                         <field name="dow_3_open" />
1504                         <field name="dow_4_close" />
1505                         <field name="dow_4_open" />
1506                         <field name="dow_5_close" />
1507                         <field name="dow_5_open" />
1508                         <field name="dow_6_close" />
1509                         <field name="dow_6_open" />
1510                         <field name="id" reporter:datatype="id" />
1511                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
1512                 </fields>
1513                 <links>
1514                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
1515                 </links>
1516         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1517             <actions>
1518                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
1519                 <retrieve/>
1520                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
1521                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
1522             </actions>
1523         </permacrud>
1524         </class>
1525         <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">
1526                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
1527                         <field name="close_end" reporter:datatype="timestamp" />
1528                         <field name="close_start" reporter:datatype="timestamp" />
1529                         <field name="id" reporter:datatype="id" />
1530                         <field name="org_unit" reporter:datatype="org_unit"/>
1531                         <field name="reason" reporter:datatype="text"/>
1532                 </fields>
1533                 <links>
1534                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1535                 </links>
1536         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1537             <actions>
1538                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
1539                 <retrieve/>
1540                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
1541                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
1542             </actions>
1543         </permacrud>
1544         </class>
1545         <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">
1546                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
1547                         <field name="extended" reporter:datatype="interval"/>
1548                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
1549                         <field name="max_renewals" reporter:datatype="int" />
1550                         <field name="name" reporter:datatype="text"/>
1551                         <field name="normal" reporter:datatype="interval"/>
1552                         <field name="shrt" reporter:datatype="interval"/>
1553                 </fields>
1554                 <links>
1555                 </links>
1556         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1557             <actions>
1558                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
1559                 <retrieve/>
1560                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
1561                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
1562             </actions>
1563         </permacrud>
1564         </class>
1565         <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">
1566                 <fields oils_persist:primary="id" oils_persist:sequence="">
1567                         <field name="balance_owed" reporter:datatype="money"/>
1568                         <field name="id" reporter:datatype="id" />
1569                         <field name="last_billing_note" reporter:datatype="text"/>
1570                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
1571                         <field name="last_billing_type" reporter:datatype="text"/>
1572                         <field name="last_payment_note" reporter:datatype="text"/>
1573                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
1574                         <field name="last_payment_type" reporter:datatype="text"/>
1575                         <field name="total_owed" reporter:datatype="money"/>
1576                         <field name="total_paid" reporter:datatype="money"/>
1577                         <field name="usr" reporter:datatype="link"/>
1578                         <field name="xact_finish" reporter:datatype="timestamp" />
1579                         <field name="xact_start" reporter:datatype="timestamp" />
1580                         <field name="xact_type" reporter:datatype="text"/>
1581                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
1582                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
1583                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
1584                         <field name="billing_location" reporter:datatype="link"/>
1585                 </fields>
1586                 <links>
1587                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1588                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
1589                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
1590                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
1591                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1592                 </links>
1593         </class>
1594         <class id="au" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user" oils_persist:tablename="actor.usr" reporter:core="true" reporter:label="ILS User">
1595                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
1596                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
1597                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
1598                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
1599                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
1600                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
1601                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
1602                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
1603                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1604                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
1605                         <field name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
1606                         <field name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
1607                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1608                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
1609                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
1610                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
1611                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
1612                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
1613                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1614                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
1615                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
1616                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
1617                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
1618                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
1619                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
1620                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
1621                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
1622                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
1623                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
1624                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
1625                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
1626                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
1627                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
1628                         <field name="last_xact_id" reporter:datatype="text"/>
1629                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
1630                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
1631                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
1632                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
1633                         <field reporter:label="Password" name="passwd"  reporter:datatype="text"/>
1634                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
1635                         <field reporter:label="Prefix" name="prefix"  reporter:datatype="text"/>
1636                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
1637                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
1638                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
1639                         <field reporter:label="Suffix/Title" name="suffix"  reporter:datatype="text"/>
1640                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
1641                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
1642                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
1643                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
1644                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
1645                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
1646                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
1647                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1648                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
1649                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
1650                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
1651                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1652                 </fields>
1653                 <links>
1654                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
1655                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
1656                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
1657                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
1658                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
1659                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
1660                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
1661                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
1662                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
1663                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
1664                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
1665                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
1666                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
1667                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
1668                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
1669                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
1670                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
1671                         <link reporter:label="Billable Transactions" field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
1672                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
1673                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
1674                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
1675                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
1676                         <link reporter:label="Check-ins Performed as Staff" field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
1677                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
1678                         <link reporter:label="Circulations Performed as Staff" field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
1679                 </links>
1680         </class>
1681         <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">
1682                 <fields oils_persist:primary="name">
1683                         <field name="name" reporter:datatype="text"/>
1684                         <field name="label" reporter:datatype="text"/>
1685                         <field name="description" reporter:datatype="text"/>
1686                         <field name="datatype" reporter:datatype="text"/>
1687                         <field name="fm_class" reporter:datatype="text"/>
1688                 </fields>
1689                 <links>
1690                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
1691                 </links>
1692                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1693                         <actions>
1694                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
1695                                 <retrieve/>
1696                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
1697                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
1698                         </actions>
1699                 </permacrud>
1700         </class>
1701         <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">
1702                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
1703                         <field name="id" />
1704                         <field name="name"  reporter:datatype="text"/>
1705                         <field name="org_unit" reporter:datatype="org_unit"/>
1706                         <field name="value"  reporter:datatype="text"/>
1707                 </fields>
1708                 <links>
1709                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1710                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
1711                 </links>
1712         </class>
1713         <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">
1714                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
1715                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1716                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
1717                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1718                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
1719                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1720                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
1721                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
1722                 </fields>
1723                 <links>
1724                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
1725                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1726                 </links>
1727         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1728             <actions>
1729                 <create permission="CREATE_COPY_NOTE">
1730                     <context link="owning_copy" field="circ_lib"/>
1731                 </create>
1732                 <retrieve permission="VIEW_COPY_NOTES">
1733                     <context link="owning_copy" field="circ_lib"/>
1734                 </retrieve>
1735                 <update permission="UPDATE_COPY_NOTE">
1736                     <context link="owning_copy" field="circ_lib"/>
1737                 </update>
1738                 <delete permission="DELETE_COPY_NOTE">
1739                     <context link="owning_copy" field="circ_lib"/>
1740                 </delete>
1741             </actions>
1742         </permacrud>
1743         </class>
1744         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
1745                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
1746                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
1747                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
1748                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
1749                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
1750                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
1751                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
1752                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
1753                 </fields>
1754                 <links>
1755                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
1756                 </links>
1757         </class>
1758         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
1759                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
1760                         <field name="fingerprint"  reporter:datatype="text"/>
1761                         <field name="id" reporter:datatype="id" />
1762                         <field name="master_record" reporter:datatype="link"/>
1763                         <field name="mods"  reporter:datatype="text"/>
1764                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
1765                 </fields>
1766                 <links>
1767                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
1768                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
1769                 </links>
1770         </class>
1771         <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">
1772                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
1773                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
1774                         <field name="name"  reporter:datatype="text"/>
1775                 </fields>
1776                 <links/>
1777         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1778             <actions>
1779                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
1780                 <retrieve/>
1781                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
1782                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
1783             </actions>
1784         </permacrud>
1785         </class>
1786         <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">
1787                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
1788                         <field name="code"  reporter:datatype="text"/>
1789                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
1790                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
1791                 </fields>
1792                 <links/>
1793         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1794             <actions>
1795                 <create permission="CREATE_PERM" global_required="true"/>
1796                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
1797                 <update permission="UPDATE_PERM" global_required="true"/>
1798                 <delete permission="DELETE_PERM" global_required="true"/>
1799             </actions>
1800         </permacrud>
1801         </class>
1802         <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">
1803                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
1804                         <field name="id" reporter:datatype="id" />
1805                         <field name="metarecord" reporter:datatype="link"/>
1806                         <field name="source" reporter:datatype="link"/>
1807                 </fields>
1808                 <links>
1809                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1810                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
1811                 </links>
1812         </class>
1813         <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">
1814                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
1815                         <field name="field" reporter:datatype="link"/>
1816                         <field name="id" reporter:datatype="id" />
1817                         <field name="source" reporter:datatype="link"/>
1818                         <field name="value"  reporter:datatype="text"/>
1819                 </fields>
1820                 <links>
1821                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1822                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1823                 </links>
1824         </class>
1825         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
1826                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
1827                         <field name="accepting_usr" reporter:datatype="link"/>
1828                         <field name="amount" reporter:datatype="money" />
1829                         <field name="amount_collected" reporter:datatype="money" />
1830                         <field name="cash_drawer" reporter:datatype="link"/>
1831                         <field name="id" reporter:datatype="id" />
1832                         <field name="note"  reporter:datatype="text"/>
1833                         <field name="payment_ts" reporter:datatype="timestamp"/>
1834                         <field name="xact" reporter:datatype="link"/>
1835                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
1836                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
1837                 </fields>
1838                 <links>
1839                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
1840                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
1841                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
1842                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
1843                 </links>
1844         </class>
1845         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
1846                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
1847                         <field name="accepting_usr" reporter:datatype="link"/>
1848                         <field name="amount" reporter:datatype="money" />
1849                         <field name="amount_collected" reporter:datatype="money" />
1850                         <field name="id" reporter:datatype="id" />
1851                         <field name="note"  reporter:datatype="text"/>
1852                         <field name="payment_ts" reporter:datatype="timestamp"/>
1853                         <field name="xact" reporter:datatype="link"/>
1854                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
1855                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
1856                 </fields>
1857                 <links>
1858                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
1859                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
1860                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
1861                 </links>
1862         </class>
1863         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
1864                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
1865                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
1866                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
1867                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
1868                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
1869                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
1870                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
1871                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
1872                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
1873                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
1874                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
1875                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
1876                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
1877                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
1878                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
1879                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
1880                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
1881                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
1882                 </fields>
1883                 <links>
1884                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
1885                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
1886                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
1887                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1888                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
1889                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
1890                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
1891                 </links>
1892         </class>
1893
1894         <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">
1895                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
1896                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
1897                         <field name="name"  reporter:datatype="text"/>
1898                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
1899                         <field name="block_list" reporter:datatype="text"/>
1900                         <field name="org_depth" reporter:datatype="int"/>
1901                 </fields>
1902                 <links/>
1903         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1904             <actions>
1905                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
1906                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
1907                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
1908                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
1909             </actions>
1910         </permacrud>
1911         </class>
1912         <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">
1913                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
1914                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
1915                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
1916                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
1917                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
1918                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
1919                 </fields>
1920                 <links>
1921                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
1922                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1923                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1924         </links>
1925         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1926             <actions>
1927                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
1928                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
1929                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
1930                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
1931             </actions>
1932         </permacrud>
1933         </class>
1934         <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">
1935                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
1936                         <field name="holdable" reporter:datatype="bool"/>
1937                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
1938                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
1939                         <field name="opac_visible" reporter:datatype="bool"/>
1940                 </fields>
1941                 <links/>
1942         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1943             <actions>
1944                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
1945                 <retrieve permission="CREATE_COPY_STATUS UPDATE_COPY_STATUS DELETE_COPY_STATUS" global_required="true"/>
1946                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
1947                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
1948             </actions>
1949         </permacrud>
1950         </class>
1951         <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">
1952                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
1953                         <field name="id" reporter:datatype="id" reporter:label="ID" />
1954                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
1955                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
1956                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
1957                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
1958                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
1959                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
1960                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
1961                 </fields>
1962                 <links>
1963                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1964                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1965                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1966                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
1967                 </links>
1968                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1969                         <actions>
1970                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
1971                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
1972                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
1973                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
1974                         </actions>
1975                 </permacrud>
1976         </class>
1977         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
1978                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
1979                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
1980                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
1981                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
1982                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
1983                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
1984                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
1985                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
1986                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
1987                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
1988                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1989                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
1990                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
1991                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
1992                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
1993                 </fields>
1994                 <links>
1995                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1996                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
1997                 </links>
1998         </class>
1999         <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">
2000                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
2001                         <field name="call_number" />
2002                         <field name="create_date" reporter:datatype="timestamp"/>
2003                         <field name="creator" reporter:datatype="link"/>
2004                         <field name="id" reporter:datatype="id" />
2005                         <field name="pub" reporter:datatype="bool"/>
2006                         <field name="title"  reporter:datatype="text"/>
2007                         <field name="value"  reporter:datatype="text"/>
2008                 </fields>
2009                 <links>
2010                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2011                 </links>
2012         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2013             <actions>
2014                 <create permission="CREATE_VOLUME_NOTE">
2015                     <context link="call_number" field="owning_lib"/>
2016                 </create>
2017                 <retrieve permission="VIEW_VOLUME_NOTES">
2018                     <context link="call_number" field="owning_lib"/>
2019                 </retrieve>
2020                 <update permission="UPDATE_VOLUME_NOTE">
2021                     <context link="call_number" field="owning_lib"/>
2022                 </update>
2023                 <delete permission="DELETE_VOLUME_NOTE">
2024                     <context link="call_number" field="owning_lib"/>
2025                 </delete>
2026             </actions>
2027         </permacrud>
2028         </class>
2029         <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">
2030                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
2031                         <field name="create_date" reporter:datatype="timestamp"/>
2032                         <field name="creator" reporter:datatype="link"/>
2033                         <field name="edit_date" reporter:datatype="timestamp"/>
2034                         <field name="editor" reporter:datatype="link"/>
2035                         <field name="id" reporter:datatype="id" />
2036                         <field name="record" reporter:datatype="link"/>
2037                         <field name="value" reporter:datatype="text"/>
2038                 </fields>
2039                 <links>
2040                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2041                 </links>
2042         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2043             <actions>
2044                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2045                 <retrieve permission="VIEW_AUTHORITY_RECORD_NOTES" global_required='true'/>
2046                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2047                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2048             </actions>
2049         </permacrud>
2050         </class>
2051         <class id="circ" controller="open-ils.cstore" oils_obj:fieldmapper="action::circulation" oils_persist:tablename="action.circulation" reporter:core="true" reporter:label="Circulation">
2052                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2053                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2054                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2055                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2056                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2057                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2058                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2059                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2060                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2061                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2062                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2063                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2064                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2065                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2066                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2067                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2068                         <field reporter:label="Recurring Fine Amount" name="recuring_fine" reporter:datatype="money" />
2069                         <field reporter:label="Recurring Fine Rule" name="recuring_fine_rule" reporter:datatype="link"/>
2070                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2071                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2072                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2073                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2074                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
2075                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2076                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2077                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2078                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
2079                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
2080                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
2081                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
2082                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2083                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2084                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2085                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2086                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2087                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2088                 </fields>
2089                 <links>
2090                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2091                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2092                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2093                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2094                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2095                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2096                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2097                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2098                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2099                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2100                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2101                         <link field="recuring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2102                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2103                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2104                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2105                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
2106                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
2107                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
2108                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
2109                 </links>
2110         </class>
2111         <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">
2112                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2113                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2114                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2115                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2116                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2117                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2118                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2119                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2120                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2121                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2122                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2123                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2124                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2125                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2126                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2127                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2128                         <field reporter:label="Recurring Fine Amount" name="recuring_fine" reporter:datatype="money" />
2129                         <field reporter:label="Recurring Fine Rule" name="recuring_fine_rule" reporter:datatype="link"/>
2130                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2131                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2132                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2133                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2134                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
2135                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2136                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2137                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2138                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2139                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2140                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2141                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2142                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2143                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2144                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
2145                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
2146                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
2147                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
2148                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
2149                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
2150                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
2151                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
2152                 </fields>
2153                 <links>
2154                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2155                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2156                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2157                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2158                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2159                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2160                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2161                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2162                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2163                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2164                         <link field="recuring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2165                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2166                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2167                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2168                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
2169                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
2170                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2171                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2172                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
2173                 </links>
2174         </class>
2175         <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">
2176                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2177                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2178                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2179                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2180                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2181                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2182                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2183                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2184                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2185                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2186                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2187                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2188                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2189                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2190                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2191                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2192                         <field reporter:label="Recurring Fine Amount" name="recuring_fine" reporter:datatype="money" />
2193                         <field reporter:label="Recurring Fine Rule" name="recuring_fine_rule" reporter:datatype="link"/>
2194                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2195                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2196                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2197                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2198                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
2199                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2200                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2201                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2202                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
2203                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
2204                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
2205                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
2206                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2207                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2208                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2209                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2210                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2211                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2212                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
2213                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
2214                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
2215                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
2216                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
2217                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
2218                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
2219                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
2220                 </fields>
2221                 <links>
2222                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2223                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2224                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2225                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2226                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2227                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2228                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2229                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2230                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2231                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2232                         <link field="recuring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2233                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2234                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2235                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2236                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
2237                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
2238                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2239                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2240                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
2241                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
2242                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
2243                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
2244                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
2245                 </links>
2246         </class>
2247         <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">
2248                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
2249                         <field name="bucket" reporter:datatype="link"/>
2250                         <field name="id" reporter:datatype="id" />
2251                         <field name="target_call_number" reporter:datatype="link" />
2252                         <field name="create_time" reporter:datatype="timestamp" />
2253                         <field name="pos" reporter:datatype="int" />
2254                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2255                 </fields>
2256                 <links>
2257                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
2258                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
2259             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
2260                 </links>
2261         </class>
2262         <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">
2263                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
2264                         <field name="id" reporter:datatype="id" />
2265                         <field name="item" reporter:datatype="link"/>
2266                         <field name="note" reporter:datatype="text" />
2267                 </fields>
2268                 <links>
2269                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
2270                 </links>
2271         </class>
2272         <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">
2273                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
2274                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
2275                         <field name="btype" reporter:datatype="text"/>
2276                         <field name="id" reporter:datatype="id" />
2277                         <field name="name" reporter:datatype="text"/>
2278                         <field name="owner" reporter:datatype="link"/>
2279                         <field name="pub" reporter:datatype="bool"/>
2280                         <field name="create_time" reporter:datatype="timestamp" />
2281                 </fields>
2282                 <links>
2283                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
2284                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
2285                 </links>
2286         </class>
2287         <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">
2288                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
2289                         <field name="id" reporter:datatype="id" />
2290                         <field name="bucket" reporter:datatype="link"/>
2291                         <field name="note" reporter:datatype="text" />
2292                 </fields>
2293                 <links>
2294                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
2295                 </links>
2296         </class>
2297         <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">
2298                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
2299                         <field name="hold" reporter:datatype="link"/>
2300                         <field name="id" reporter:datatype="id" />
2301                         <field name="target_copy" reporter:datatype="link"/>
2302                 </fields>
2303                 <links>
2304                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
2305                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2306                 </links>
2307         </class>
2308         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
2309                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
2310                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
2311                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
2312                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
2313                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
2314                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
2315                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
2316                 </fields>
2317                 <links>
2318                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
2319                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
2320                 </links>
2321         </class>
2322         <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">
2323                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
2324                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
2325                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
2326                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
2327                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2328                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
2329                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
2330                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
2331                 </fields>
2332                 <links>
2333                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2334                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
2335                 </links>
2336         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2337             <actions>
2338                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
2339                 <retrieve/>
2340                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
2341                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
2342             </actions>
2343         </permacrud>
2344         </class>
2345         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
2346                 <fields>
2347                         <field name="id" oils_persist:virtual="true" />
2348                         <field name="location" oils_persist:virtual="true" />
2349                         <field name="owning_lib" oils_persist:virtual="true" />
2350                         <field name="holdings" oils_persist:virtual="true" />
2351                         <field name="current_holdings" oils_persist:virtual="true" />
2352                         <field name="supplements" oils_persist:virtual="true" />
2353                         <field name="current_supplements" oils_persist:virtual="true" />
2354                         <field name="indexes" oils_persist:virtual="true" />
2355                         <field name="current_indexes" oils_persist:virtual="true" />
2356                         <field name="online" oils_persist:virtual="true" />
2357                         <field name="missing" oils_persist:virtual="true" />
2358                         <field name="incomplete" oils_persist:virtual="true" />
2359                 </fields>
2360         </class>
2361         <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">
2362                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
2363                         <field name="active" reporter:datatype="bool"/>
2364                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2365                         <field name="create_date" reporter:datatype="timestamp"/>
2366                         <field name="creator" />
2367                         <field name="deleted" reporter:datatype="bool"/>
2368                         <field name="edit_date" reporter:datatype="timestamp"/>
2369                         <field name="editor" />
2370                         <field name="id" reporter:datatype="id" />
2371                         <field name="last_xact_id" />
2372                         <field name="marc" />
2373                         <field name="source" />
2374                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
2375                 </fields>
2376                 <links>
2377                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2378                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2379                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2380                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2381                 </links>
2382                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2383                         <actions>
2384                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
2385                                 <retrieve/>
2386                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
2387                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
2388                         </actions>
2389                 </permacrud>
2390         </class>
2391         <class id="ssub" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
2392                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
2393                         <field name="active" reporter:datatype="bool"/>
2394                         <field reporter:label="Call Number" name="call_number" reporter:datatype="link"/>
2395                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
2396                         <field reporter:label="Start date" name="start_date" reporter:datatype="timestamp"/>
2397                         <field reporter:label="End date" name="end_date" reporter:datatype="timestamp"/>
2398                 </fields>
2399                 <links>
2400                         <link field="call_number" reltype="might_have" key="id" map="" class="acn"/>
2401                         <link field="uri" reltype="might_have" key="id" map="" class="auri"/>
2402                 </links>
2403         </class>
2404         <class id="sbu" controller="open-ils.cstore" oils_obj:fieldmapper="serial::binding_unit" oils_persist:tablename="serial.binding_unit" reporter:label="Binding Unit">
2405                 <fields oils_persist:primary="id" oils_persist:sequence="serial.binding_unit_id_seq">
2406                         <field name="active" reporter:datatype="bool"/>
2407                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
2408                         <field reporter:label="Label" name="label" />
2409                 </fields>
2410                 <links>
2411                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
2412                 </links>
2413         </class>
2414         <class id="siss" controller="open-ils.cstore" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
2415                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
2416                         <field name="id" reporter:datatype="id" />
2417                         <field name="subscription" reporter:datatype="link"/>
2418                         <field name="target_copy" reporter:datatype="link"/>
2419                         <field name="location" reporter:datatype="link"/>
2420                         <field name="binding_unit" reporter:datatype="link"/>
2421                         <field name="label" />
2422                 </fields>
2423                 <links>
2424                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
2425                         <link field="target_copy" reltype="might_have" key="id" map="" class="acp"/>
2426                         <link field="location" reltype="might_have" key="id" map="" class="acpl"/>
2427                         <link field="binding_unit" reltype="might_have" key="id" map="" class="sbu"/>
2428                 </links>
2429         </class>
2430         <class id="sbsum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::bib_summary" oils_persist:tablename="serial.bib_summary" reporter:label="Bib Summary">
2431                 <fields oils_persist:primary="id" oils_persist:sequence="serial.bib_summary_id_seq">
2432                         <field name="id" reporter:datatype="id" />
2433                         <field name="subscription" reporter:datatype="link"/>
2434                         <field name="generated_coverage" reporter:datatype="text"/>
2435                         <field name="textual_holdings" reporter:datatype="text"/>
2436                 </fields>
2437                 <links>
2438                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
2439                 </links>
2440         </class>
2441         <class id="sssum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::sup_summary" oils_persist:tablename="serial.sup_summary" reporter:label="Supplemental Issue Summary">
2442                 <fields oils_persist:primary="id" oils_persist:sequence="serial.sup_summary_id_seq">
2443                         <field name="id" reporter:datatype="id" />
2444                         <field name="subscription" reporter:datatype="link"/>
2445                         <field name="generated_coverage" reporter:datatype="text"/>
2446                         <field name="textual_holdings" reporter:datatype="text"/>
2447                 </fields>
2448                 <links>
2449                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
2450                 </links>
2451         </class>
2452         <class id="sisum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::index_summary" oils_persist:tablename="serial.index_summary" reporter:label="Index Summary">
2453                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
2454                         <field name="id" reporter:datatype="id" />
2455                         <field name="subscription" reporter:datatype="link"/>
2456                         <field name="generated_coverage" reporter:datatype="text"/>
2457                         <field name="textual_holdings" reporter:datatype="text"/>
2458                 </fields>
2459                 <links>
2460                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
2461                 </links>
2462         </class>
2463
2464         <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">
2465                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
2466                         <field name="id" reporter:datatype="id" />
2467                         <field name="owning_copy" reporter:datatype="link"/>
2468                         <field name="stat_cat" reporter:datatype="link"/>
2469                         <field name="stat_cat_entry" reporter:datatype="link"/>
2470                 </fields>
2471                 <links>
2472                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
2473                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
2474                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
2475                 </links>
2476         </class>
2477         <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">
2478                 <fields oils_persist:primary="code">
2479                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2480                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2481                 </fields>
2482                 <links/>
2483         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2484             <actions>
2485                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2486                 <retrieve/>
2487                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2488                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2489             </actions>
2490         </permacrud>
2491         </class>
2492         <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">
2493                 <fields oils_persist:primary="code">
2494                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
2495                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2496                 </fields>
2497                 <links/>
2498         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2499             <actions>
2500                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2501                 <retrieve permission="CREATE_MARC_CODE UPDATE_MARC_CODE DELETE_MARC_CODE" global_required="true"/>
2502                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2503                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2504             </actions>
2505         </permacrud>
2506         </class>
2507         <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">
2508                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
2509                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
2510                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
2511                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
2512                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
2513                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
2514                 </fields>
2515                 <links>
2516             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2517         </links>
2518         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2519             <actions>
2520                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
2521                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
2522                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
2523                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
2524             </actions>
2525         </permacrud>
2526         </class>
2527         <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">
2528                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
2529                         <field name="id" reporter:datatype="id" />
2530                         <field name="name" reporter:datatype="text"/>
2531                 </fields>
2532                 <links/>
2533         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2534             <actions>
2535                 <create permission="CREATE_LASSO" global_required="true"/>
2536                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
2537                 <update permission="UPDATE_LASSO" global_required="true"/>
2538                 <delete permission="DELETE_LASSO" global_required="true"/>
2539             </actions>
2540         </permacrud>
2541         </class>
2542         <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">
2543                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
2544                         <field name="id" reporter:datatype="id" />
2545                         <field name="lasso" reporter:datatype="link"/>
2546                         <field name="org_unit" reporter:datatype="org_unit"/>
2547                 </fields>
2548                 <links>
2549                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
2550                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2551                 </links>
2552         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2553             <actions>
2554                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
2555                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
2556                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
2557                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
2558             </actions>
2559         </permacrud>
2560         </class>
2561         <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">
2562                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
2563                         <field name="id" reporter:datatype="id" />
2564                         <field name="from_org" reporter:datatype="org_unit"/>
2565                         <field name="to_org" reporter:datatype="org_unit"/>
2566                         <field name="prox" reporter:datatype="int" />
2567                 </fields>
2568                 <links>
2569                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
2570                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
2571                 </links>
2572         </class>
2573         <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">
2574                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
2575                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2576                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
2577                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
2578                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
2579                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
2580                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
2581                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
2582                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
2583                 </fields>
2584                 <links/>
2585         </class>
2586         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
2587                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
2588                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
2589                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
2590                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2591                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
2592                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
2593                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2594                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
2595                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2596                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
2597                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
2598                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
2599                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
2600                 </fields>
2601                 <links>
2602                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2603                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
2604                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
2605                 </links>
2606         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2607             <actions>
2608                 <create permission="ADMIN_SURVEY" context_field="owner"/>
2609                 <retrieve/>
2610                 <update permission="ADMIN_SURVEY" context_field="owner"/>
2611                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
2612             </actions>
2613         </permacrud>
2614         </class>
2615         <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">
2616                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
2617                         <field name="address_type"  reporter:datatype="text"/>
2618                         <field name="city"  reporter:datatype="text"/>
2619                         <field name="country"  reporter:datatype="text"/>
2620                         <field name="county"  reporter:datatype="text"/>
2621                         <field name="id" reporter:datatype="id" />
2622                         <field name="org_unit" reporter:datatype="org_unit"/>
2623                         <field name="post_code"  reporter:datatype="text"/>
2624                         <field name="state"  reporter:datatype="text"/>
2625                         <field name="street1"  reporter:datatype="text"/>
2626                         <field name="street2"  reporter:datatype="text"/>
2627                         <field name="valid" reporter:datatype="bool"/>
2628                 </fields>
2629                 <links>
2630                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2631                 </links>
2632         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2633             <actions>
2634                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
2635                 <retrieve/>
2636                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
2637                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
2638             </actions>
2639         </permacrud>
2640         </class>
2641         <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">
2642                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
2643                         <field name="status" oils_persist:virtual="true" />
2644                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
2645                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
2646                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
2647                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
2648                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
2649                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
2650                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
2651                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
2652                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
2653                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
2654                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
2655                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
2656                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
2657                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
2658                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
2659                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
2660                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
2661                         <field reporter:label="Item Selection Depth" name="selection_depth" />
2662                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
2663                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
2664                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
2665                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
2666                         <field name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
2667                         <field name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
2668                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
2669                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
2670                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
2671                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
2672                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
2673                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
2674                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
2675                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
2676                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
2677                 </fields>
2678                 <links>
2679                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
2680                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
2681                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
2682                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
2683                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
2684                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
2685                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2686                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
2687                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
2688                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
2689                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
2690                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
2691                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
2692                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
2693                 </links>
2694         </class>
2695         <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">
2696                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
2697                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2698                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
2699                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2700                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
2701                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
2702                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
2703                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
2704                 </fields>
2705                 <links>
2706                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
2707                 </links>
2708                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2709                         <actions>
2710                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
2711                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
2712                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
2713                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
2714                         </actions>
2715                 </permacrud>
2716         </class>
2717         <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">
2718                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
2719                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
2720                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
2721                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
2722                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
2723                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
2724                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
2725                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
2726                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
2727                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
2728                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text"/>
2729                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
2730                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
2731                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
2732                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
2733                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
2734                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
2735                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
2736                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
2737                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
2738                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
2739                 </fields>
2740                 <links>
2741                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
2742                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
2743                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
2744                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
2745                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
2746                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
2747                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
2748                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
2749                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
2750                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
2751                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
2752                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
2753                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
2754                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
2755                         <link field="distribution_formulas" reltype="has_many" key="owner" map="" class="acqdf"/>
2756                         <link field="distribution_formula_entries" reltype="has_many" key="owning_lib" map="" class="acqdfe"/>
2757                 </links>
2758         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2759             <actions>
2760                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
2761                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT">
2762                     <context field="id"/>
2763                     <context field="parent_ou"/>
2764                                 </retrieve>
2765                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
2766                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
2767             </actions>
2768         </permacrud>
2769         </class>
2770         <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">
2771                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
2772                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
2773                         <field name="btype" reporter:datatype="text"/>
2774                         <field name="id" reporter:datatype="id" />
2775                         <field name="name"  reporter:datatype="text"/>
2776                         <field name="owner" reporter:datatype="link"/>
2777                         <field name="pub" reporter:datatype="bool"/>
2778                         <field name="create_time" reporter:datatype="timestamp" />
2779                 </fields>
2780                 <links>
2781                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
2782                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
2783                 </links>
2784         </class>
2785         <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">
2786                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
2787                         <field name="id" reporter:datatype="id" />
2788                         <field name="bucket" reporter:datatype="link"/>
2789                         <field name="note" reporter:datatype="text" />
2790                 </fields>
2791                 <links>
2792                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
2793                 </links>
2794         </class>
2795         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
2796                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
2797                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
2798                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2799                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
2800                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
2801                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2802                 </fields>
2803                 <links>
2804                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2805                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
2806                 </links>
2807         </class>
2808         <class id="ac" controller="open-ils.cstore" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
2809                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
2810                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
2811                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
2812                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
2813                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2814                 </fields>
2815                 <links>
2816                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2817                 </links>
2818         </class>
2819         <class id="actsc" controller="open-ils.cstore" oils_obj:fieldmapper="actor::stat_cat" oils_persist:tablename="actor.stat_cat" reporter:label="User Statistical Category">
2820                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
2821                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
2822                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2823                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
2824                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
2825                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2826                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
2827                 </fields>
2828                 <links>
2829                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2830                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
2831                 </links>
2832         </class>
2833         <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">
2834                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
2835                         <field name="field" reporter:datatype="link"/>
2836                         <field name="id" reporter:datatype="id" />
2837                         <field name="source" reporter:datatype="link"/>
2838                         <field name="value"  reporter:datatype="text"/>
2839                 </fields>
2840                 <links>
2841                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2842                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2843                 </links>
2844         </class>
2845         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
2846                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
2847                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
2848                         <field name="btype" reporter:datatype="text"/>
2849                         <field name="id" reporter:datatype="id" />
2850                         <field name="name"  reporter:datatype="text"/>
2851                         <field name="owner" reporter:datatype="link"/>
2852                         <field name="pub" reporter:datatype="bool"/>
2853                         <field name="create_time" reporter:datatype="timestamp" />
2854                 </fields>
2855                 <links>
2856                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
2857                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
2858                 </links>
2859         </class>
2860         <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">
2861                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
2862                         <field name="id" reporter:datatype="id" />
2863                         <field name="bucket" reporter:datatype="link"/>
2864                         <field name="note" reporter:datatype="text" />
2865                 </fields>
2866                 <links>
2867                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
2868                 </links>
2869         </class>
2870         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
2871                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2872                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
2873                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
2874                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
2875                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
2876                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
2877                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
2878                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
2879                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2880                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2881                 </fields>
2882                 <links>
2883                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2884                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2885                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2886                 </links>
2887         </class>
2888         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
2889                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
2890                         <field name="id" reporter:datatype="id" />
2891                         <field name="ind1" />
2892                         <field name="ind2" />
2893                         <field name="record" />
2894                         <field name="subfield" />
2895                         <field name="tag" />
2896                         <field name="value" />
2897                 </fields>
2898                 <links>
2899                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2900                 </links>
2901         </class>
2902         <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">
2903                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
2904                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
2905                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2906                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
2907                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
2908                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2909                 </fields>
2910                 <links>
2911                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2912                 </links>
2913         </class>
2914         <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">
2915                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
2916                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
2917                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
2918                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
2919                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
2920                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2921                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
2922                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
2923                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
2924                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
2925                 </fields>
2926                 <links>
2927                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
2928                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
2929                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
2930                 </links>
2931         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2932             <actions>
2933                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
2934                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT" global_required="true"/>
2935                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
2936                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
2937             </actions>
2938         </permacrud>
2939         </class>
2940         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
2941                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
2942                         <field name="create_date" reporter:datatype="timestamp"/>
2943                         <field name="creator" reporter:datatype="link"/>
2944                         <field name="edit_date" reporter:datatype="timestamp"/>
2945                         <field name="editor" reporter:datatype="link"/>
2946                         <field name="id" reporter:datatype="id" />
2947                         <field name="pub" reporter:datatype="bool"/>
2948                         <field name="record" reporter:datatype="link"/>
2949                         <field name="value"  reporter:datatype="text"/>
2950                 </fields>
2951                 <links>
2952                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2953                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2954                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2955                 </links>
2956         </class>
2957         <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">
2958                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2959                         <field name="balance_owed" reporter:datatype="money" />
2960                         <field name="total_owed" reporter:datatype="money" />
2961                         <field name="total_paid" reporter:datatype="money" />
2962                         <field name="usr" reporter:datatype="link"/>
2963                 </fields>
2964                 <links>
2965                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2966                 </links>
2967         </class>
2968         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
2969                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2970                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
2971                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
2972                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
2973                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2974                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
2975                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
2976                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2977                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2978                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2979                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2980                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2981                 </fields>
2982                 <links>
2983                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2984                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2985                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2986                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2987                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2988                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2989                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2990                 </links>
2991         </class>
2992         <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">
2993                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
2994                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
2995                         <field name="quality" reporter:datatype="int" />
2996                         <field name="source" reporter:datatype="text"/>
2997                         <field name="transcendant" reporter:datatype="bool"/>
2998                 </fields>
2999                 <links/>
3000         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3001             <actions>
3002                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
3003                 <retrieve/>
3004                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
3005                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
3006             </actions>
3007         </permacrud>
3008         </class>
3009         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
3010                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3011                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3012                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3013                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
3014                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
3015                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3016                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3017                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3018                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3019                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3020                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3021                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3022                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
3023                 </fields>
3024                 <links>
3025                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3026                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3027                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3028                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3029                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3030                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3031                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3032                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
3033                 </links>
3034         </class>
3035         <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">
3036                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
3037                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
3038                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
3039                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
3040                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
3041                 </fields>
3042                 <links>
3043                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
3044                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3045                 </links>
3046         </class>
3047         <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">
3048                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
3049                         <field name="bucket" reporter:datatype="link"/>
3050                         <field name="id" reporter:datatype="id" />
3051                         <field name="target_user" reporter:datatype="link"/>
3052                         <field name="create_time" reporter:datatype="timestamp" />
3053                         <field name="pos" reporter:datatype="int" />
3054                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
3055                 </fields>
3056                 <links>
3057                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
3058                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
3059             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
3060                 </links>
3061         </class>
3062         <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">
3063                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
3064                         <field name="id" reporter:datatype="id" />
3065                         <field name="item" reporter:datatype="link"/>
3066                         <field name="note" reporter:datatype="text" />
3067                 </fields>
3068                 <links>
3069                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
3070                 </links>
3071         </class>
3072         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
3073                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3074                         <field name="balance_owed" reporter:datatype="money" />
3075                         <field name="total_owed" reporter:datatype="money" />
3076                         <field name="total_paid" reporter:datatype="money" />
3077                         <field name="usr" reporter:datatype="link"/>
3078                 </fields>
3079                 <links>
3080                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3081                 </links>
3082         </class>
3083         <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">
3084                 <fields oils_persist:primary="code" oils_persist:sequence="">
3085                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
3086                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3087                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
3088                 </fields>
3089                 <links/>
3090         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3091             <actions>
3092                 <create permission="CREATE_MARC_CODE" global_required="true"/>
3093                 <retrieve permission="CREATE_MARC_CODE UPDATE_MARC_CODE DELETE_MARC_CODE" global_required="true"/>
3094                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
3095                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
3096             </actions>
3097         </permacrud>
3098         </class>
3099         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
3100                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3101                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
3102                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3103                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
3104                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3105                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3106                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
3107                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
3108                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3109                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
3110                 </fields>
3111                 <links>
3112                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3113                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3114                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3115                 </links>
3116         </class>
3117         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
3118                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3119                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
3120                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3121                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
3122                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3123                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3124                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
3125                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
3126                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3127                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
3128                 </fields>
3129                 <links>
3130                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3131                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3132                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3133                 </links>
3134         </class>
3135         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
3136                 <fields oils_persist:primary="id" oils_persist:sequence="">
3137                         <field name="checkin_lib" reporter:datatype="link"/>
3138                         <field name="checkin_staff" reporter:datatype="link"/>
3139                         <field name="checkin_time" reporter:datatype="timestamp"/>
3140                         <field name="circ_lib"  reporter:datatype="org_unit"/>
3141                         <field name="circ_staff" reporter:datatype="link"/>
3142                         <field name="desk_renewal" reporter:datatype="bool"/>
3143                         <field name="due_date" reporter:datatype="timestamp"/>
3144                         <field name="duration" reporter:datatype="interval"/>
3145                         <field name="duration_rule" reporter:datatype="link"/>
3146                         <field name="fine_interval" reporter:datatype="interval"/>
3147                         <field name="id" reporter:datatype="id" />
3148                         <field name="max_fine" reporter:datatype="money" />
3149                         <field name="max_fine_rule" reporter:datatype="link"/>
3150                         <field name="opac_renewal" reporter:datatype="bool"/>
3151                         <field name="phone_renewal" reporter:datatype="bool"/>
3152                         <field name="recuring_fine" reporter:datatype="money" />
3153                         <field name="recuring_fine_rule" reporter:datatype="link"/>
3154                         <field name="renewal_remaining" reporter:datatype="int" />
3155                         <field name="stop_fines" reporter:datatype="text"/>
3156                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
3157                         <field name="target_copy" reporter:datatype="link"/>
3158                         <field name="usr" reporter:datatype="link"/>
3159                         <field name="xact_finish" reporter:datatype="timestamp" />
3160                         <field name="xact_start" reporter:datatype="timestamp" />
3161                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3162                 </fields>
3163                 <links>
3164                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3165                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3166                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3167                         <link field="recuring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3168                 </links>
3169         </class>
3170         <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">
3171                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
3172                         <field name="field" reporter:datatype="link"/>
3173                         <field name="id" reporter:datatype="id" />
3174                         <field name="source" reporter:datatype="link"/>
3175                         <field name="value" reporter:datatype="text"/>
3176                 </fields>
3177                 <links>
3178                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3179                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3180                 </links>
3181         </class>
3182         <class id="crrf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::rules::recuring_fine" oils_persist:tablename="config.rule_recuring_fine" reporter:label="Recurring Fine Rule">
3183                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recuring_fine_id_seq">
3184                         <field name="high" reporter:datatype="money" />
3185                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3186                         <field name="low" reporter:datatype="money" />
3187                         <field name="name" reporter:datatype="text"/>
3188                         <field name="normal" reporter:datatype="money" />
3189                         <field name="recurance_interval" reporter:datatype="interval"/>
3190                 </fields>
3191                 <links/>
3192         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3193             <actions>
3194                 <create permission="ADMIN_RECURING_FINE_RULE" global_required="true"/>
3195                 <retrieve/>
3196                 <update permission="ADMIN_RECURING_FINE_RULE" global_required="true"/>
3197                 <delete permission="ADMIN_RECURING_FINE_RULE" global_required="true"/>
3198             </actions>
3199         </permacrud>
3200         </class>
3201         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
3202                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3203                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
3204                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3205                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
3206                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
3207                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
3208                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3209                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3210                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
3211                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
3212                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3213                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
3214                 </fields>
3215                 <links>
3216                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3217                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3218                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3219                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3220                 </links>
3221         </class>
3222         <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">
3223                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
3224                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3225                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
3226                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
3227                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3228                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
3229                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
3230                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3231                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
3232                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
3233                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
3234                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3235                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
3236                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3237                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
3238                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3239                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
3240                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
3241                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
3242                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
3243                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3244                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
3245                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
3246                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
3247                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
3248                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
3249                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
3250                         <field reporter:label="Price" name="price" reporter:datatype="money" />
3251                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
3252                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
3253                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3254                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3255                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3256                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
3257                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
3258                 </fields>
3259                 <links>
3260                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
3261                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3262                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
3263                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3264                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3265                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
3266                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3267                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
3268                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
3269                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
3270                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
3271                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
3272                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
3273                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
3274                 </links>
3275         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3276             <actions>
3277                 <create permission="CREATE_COPY">
3278                     <context link="call_number" field="owning_lib"/>
3279                 </create>
3280                 <retrieve/>
3281                 <update permission="UPDATE_COPY">
3282                     <context link="call_number" field="owning_lib"/>
3283                 </update>
3284                 <delete permission="DELETE_COPY">
3285                     <context link="call_number" field="owning_lib"/>
3286                 </delete>
3287             </actions>
3288         </permacrud>
3289         </class>
3290         <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">
3291                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
3292                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
3293                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3294                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
3295                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
3296                 </fields>
3297                 <links/>
3298         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3299             <actions>
3300                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
3301                 <retrieve/>
3302                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
3303                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
3304             </actions>
3305         </permacrud>
3306         </class>
3307         <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">
3308                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
3309                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
3310                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3311                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
3312                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
3313                 </fields>
3314                 <links/>
3315         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3316             <actions>
3317                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
3318                 <retrieve/>
3319                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
3320                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
3321             </actions>
3322         </permacrud>
3323         </class>
3324         <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">
3325                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
3326                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
3327                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3328                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3329                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3330                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
3331                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
3332                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
3333                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
3334                 </fields>
3335                 <links>
3336                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
3337                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
3338                 </links>
3339         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3340             <actions>
3341                 <create permission="CREATE_PERM" global_required="true"/>
3342                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
3343                 <update permission="UPDATE_PERM" global_required="true"/>
3344                 <delete permission="DELETE_PERM" global_required="true"/>
3345             </actions>
3346         </permacrud>
3347         </class>
3348         <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">
3349                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
3350                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
3351                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
3352                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
3353                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
3354                 </fields>
3355                 <links>
3356                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
3357                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
3358                 </links>
3359         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3360             <actions>
3361                 <create permission="ADMIN_SURVEY">
3362                     <context link="question" jump="survey" field="owner"/>
3363                 </create>
3364                 <retrieve/>
3365                 <update permission="ADMIN_SURVEY">
3366                     <context link="question" jump="survey" field="owner"/>
3367                 </update>
3368                 <delete permission="ADMIN_SURVEY">
3369                     <context link="question" jump="survey" field="owner"/>
3370                 </delete>
3371             </actions>
3372         </permacrud>
3373         </class>
3374         <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">
3375                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
3376                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3377                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
3378                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
3379                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
3380                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
3381                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
3382                 </fields>
3383                 <links>
3384                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
3385                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3386                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
3387                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3388                 </links>
3389         </class>
3390         <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">
3391                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3392                         <field name="balance_owed" reporter:datatype="money" />
3393                         <field name="total_owed" reporter:datatype="money" />
3394                         <field name="total_paid" reporter:datatype="money" />
3395                         <field name="usr" reporter:datatype="link"/>
3396                 </fields>
3397                 <links>
3398                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3399                 </links>
3400         </class>
3401         <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">
3402                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
3403                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
3404                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
3405                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
3406                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
3407                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
3408                 </fields>
3409                 <links>
3410                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3411                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
3412                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3413                 </links>
3414         </class>
3415         <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">
3416                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
3417                         <field name="field" reporter:datatype="link"/>
3418                         <field name="id" reporter:datatype="id" />
3419                         <field name="source" reporter:datatype="link"/>
3420                         <field name="value" reporter:datatype="text"/>
3421                 </fields>
3422                 <links>
3423                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3424                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3425                 </links>
3426         </class>
3427         <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">
3428                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
3429                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
3430                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
3431                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
3432                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
3433                 </fields>
3434                 <links>
3435                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
3436                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
3437                 </links>
3438         </class>
3439         <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">
3440                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
3441                         <field name="depth" reporter:datatype="int" />
3442                         <field name="grantable" reporter:datatype="bool"/>
3443                         <field name="grp" reporter:datatype="link"/>
3444                         <field name="id" reporter:datatype="id" />
3445                         <field name="perm" reporter:datatype="link"/>
3446                 </fields>
3447                 <links>
3448                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3449                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
3450                 </links>
3451         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3452             <actions>
3453                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
3454                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
3455                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
3456                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
3457             </actions>
3458         </permacrud>
3459         </class>
3460         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
3461                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
3462                         <field name="items" oils_persist:virtual="true" />
3463                         <field name="btype" reporter:datatype="text"/>
3464                         <field name="id" reporter:datatype="id" />
3465                         <field name="name" reporter:datatype="text"/>
3466                         <field name="owner" reporter:datatype="link"/>
3467                         <field name="pub" reporter:datatype="bool"/>
3468                         <field name="create_time" reporter:datatype="timestamp" />
3469                 </fields>
3470                 <links>
3471                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3472                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
3473                 </links>
3474         </class>
3475         <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">
3476                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
3477                         <field name="id" reporter:datatype="id" />
3478                         <field name="bucket" reporter:datatype="link"/>
3479                         <field name="note" reporter:datatype="text" />
3480                 </fields>
3481                 <links>
3482                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
3483                 </links>
3484         </class>
3485         <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">
3486                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
3487                         <field name="id" reporter:datatype="int" />
3488                         <field name="usr" reporter:datatype="link"/>
3489                         <field name="work_ou" reporter:datatype="link"/>
3490                 </fields>
3491                 <links>
3492                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3493                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
3494                 </links>
3495         </class>
3496         <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">
3497                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
3498                         <field name="depth" reporter:datatype="int"/>
3499                         <field name="grantable" reporter:datatype="bool"/>
3500                         <field name="id" reporter:datatype="id" />
3501                         <field name="perm" reporter:datatype="link"/>
3502                         <field name="usr" reporter:datatype="link"/>
3503                 </fields>
3504                 <links>
3505                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3506                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
3507                 </links>
3508         </class>
3509         <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">
3510                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
3511                         <field name="object_id" reporter:datatype="text"/>
3512                         <field name="grantable" reporter:datatype="bool"/>
3513                         <field name="id" reporter:datatype="id" />
3514                         <field name="perm" reporter:datatype="link"/>
3515                         <field name="usr" reporter:datatype="link"/>
3516                         <field name="object_type" reporter:datatype="text"/>
3517                 </fields>
3518                 <links>
3519                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3520                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
3521                 </links>
3522         </class>
3523         <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">
3524                 <fields oils_persist:primary="id" oils_persist:sequence="">
3525                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3526                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3527                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3528                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
3529                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
3530                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
3531                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
3532                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3533                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3534                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3535                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3536                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3537                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3538                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3539                 </fields>
3540                 <links>
3541                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
3542                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
3543                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
3544                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
3545                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
3546                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
3547                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
3548                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3549                 </links>
3550         </class>
3551         <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">
3552                 <fields oils_persist:primary="id" oils_persist:sequence="">
3553                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3554                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3555                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3556                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
3557                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
3558                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
3559                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
3560                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3561                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3562                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3563                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3564                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3565                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3566                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3567                 </fields>
3568                 <links>
3569                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
3570                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
3571                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
3572                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
3573                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
3574                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
3575                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
3576                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3577                 </links>
3578         </class>
3579         <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">
3580                 <fields oils_persist:primary="id" oils_persist:sequence="">
3581                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3582                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3583                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3584                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
3585                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
3586                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
3587                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
3588                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3589                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3590                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3591                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3592                 </fields>
3593                 <links>
3594                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
3595                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
3596                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
3597                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
3598                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3599                 </links>
3600         </class>
3601         <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">
3602                 <fields oils_persist:primary="id" oils_persist:sequence="">
3603                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3604                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3605                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3606                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
3607                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
3608                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
3609                         <field reporter:label="Accepting User" name="accepting_usr" />
3610                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
3611                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
3612                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3613                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3614                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3615                 </fields>
3616                 <links>
3617                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
3618                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
3619                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
3620                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3621                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3622                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3623                 </links>
3624         </class>
3625         <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">
3626                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
3627                         <field name="bucket" reporter:datatype="link"/>
3628                         <field name="id" reporter:datatype="id" />
3629                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
3630                         <field name="create_time" reporter:datatype="timestamp" />
3631                         <field name="pos" reporter:datatype="int" />
3632                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
3633                 </fields>
3634                 <links>
3635                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
3636                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
3637             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
3638                 </links>
3639         </class>
3640         <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">
3641                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
3642                         <field name="id" reporter:datatype="id" />
3643                         <field name="item" reporter:datatype="link"/>
3644                         <field name="note" reporter:datatype="text" />
3645                 </fields>
3646                 <links>
3647                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
3648                 </links>
3649         </class>
3650         <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">
3651                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
3652                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
3653                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
3654                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
3655                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
3656                 </fields>
3657                 <links>
3658                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
3659                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3660                 </links>
3661         </class>
3662
3663         <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">
3664                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
3665                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
3666                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
3667                 </fields>
3668                 <links/>
3669         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3670             <actions>
3671                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
3672                 <retrieve/>
3673                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
3674                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
3675             </actions>
3676         </permacrud>
3677         </class>
3678
3679
3680         <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">
3681                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
3682                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
3683                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
3684                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
3685                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
3686                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
3687                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
3688                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
3689                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
3690                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
3691                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
3692                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
3693                 </fields>
3694                 <links>
3695                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
3696                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3697                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
3698                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
3699                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
3700                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3701                 </links>
3702         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3703             <actions>
3704                 <create permission="TRANSIT_COPY" context_field="owner">
3705                     <context link="target_copy" field="circ_lib"/>
3706                 </create>
3707                 <retrieve/>
3708                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
3709                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
3710             </actions>
3711         </permacrud>
3712         </class>
3713         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
3714                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
3715                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3716                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
3717                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
3718                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
3719                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3720                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
3721                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
3722                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
3723                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
3724                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
3725                 </fields>
3726                 <links>
3727                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3728                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
3729                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
3730                 </links>
3731         </class>
3732         <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">
3733                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
3734                         <field name="grp" />
3735                         <field name="id" reporter:datatype="id" />
3736                         <field name="usr" />
3737                 </fields>
3738                 <links>
3739                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3740                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3741                 </links>
3742         </class>
3743         <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">
3744                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
3745                         <field name="id" reporter:datatype="id" />
3746                         <field name="fq_field" reporter:datatype="text"/>
3747                         <field name="identity_value" reporter:datatype="text"/>
3748                         <field name="translation" reporter:datatype="text"/>
3749                         <field name="string" reporter:datatype="text"/>
3750                 </fields>
3751                 <links>
3752                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
3753                 </links>
3754         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3755             <actions>
3756                 <create permission="CREATE_TRANSLATION" global_required="true"/>
3757                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
3758                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
3759                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
3760             </actions>
3761         </permacrud>
3762         </class>
3763         <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">
3764                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
3765                         <field name="id" reporter:datatype="id" />
3766                         <field name="fm_class" reporter:datatype="text"/>
3767                         <field name="field" reporter:datatype="text"/>
3768                         <field name="owner" reporter:datatype="org_unit"/>
3769                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
3770                 </fields>
3771                 <links>
3772                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3773                 </links>
3774         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3775             <actions>
3776                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
3777                 <retrieve/>
3778                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
3779                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
3780             </actions>
3781         </permacrud>
3782         </class>
3783         <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">
3784                 <fields oils_persist:primary="code">
3785                         <field name="code" reporter:datatype="id" />
3786                         <field name="marc_code" reporter:datatype="text"/>
3787                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3788                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3789                 </fields>
3790                 <links/>
3791         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3792             <actions>
3793                 <create permission="CREATE_LOCALE" global_required="true"/>
3794                 <retrieve permission="CREATE_LOCALE UPDATE_LOCALE DELETE_LOCALE" global_required="true"/>
3795                 <update permission="UPDATE_LOCALE" global_required="true"/>
3796                 <delete permission="DELETE_LOCALE" global_required="true"/>
3797             </actions>
3798         </permacrud>
3799         </class>
3800         <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">
3801                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
3802                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3803                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
3804                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
3805             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
3806                 </fields>
3807                 <links>
3808                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3809                 </links>
3810         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3811             <actions>
3812                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
3813                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
3814                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
3815                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
3816             </actions>
3817         </permacrud>
3818         </class>
3819         <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">
3820                 <fields oils_persist:primary="code">
3821                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
3822                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
3823                 </fields>
3824                 <links/>
3825         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3826             <actions>
3827                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
3828                 <retrieve/>
3829                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
3830                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
3831             </actions>
3832         </permacrud>
3833         </class>
3834
3835         <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">
3836                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
3837                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
3838                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
3839                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
3840                         <field reporter:label="Ratio" name="ratio" />
3841                 </fields>
3842                 <links>
3843                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
3844                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
3845                 </links>
3846                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3847                         <actions>
3848                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
3849                                 <retrieve/>
3850                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
3851                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
3852                         </actions>
3853                 </permacrud>
3854         </class>
3855
3856         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
3857                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
3858                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
3859                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
3860                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
3861                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
3862                         <field reporter:label="Code" name="code" reporter:datatype="text" />
3863                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
3864                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
3865                 </fields>
3866                 <links>
3867                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
3868                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3869             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
3870                 </links>
3871         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3872             <actions>
3873                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
3874                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
3875                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
3876                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
3877             </actions>
3878         </permacrud>
3879         </class>
3880
3881         <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">
3882                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
3883                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
3884                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3885                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3886                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3887                         <field name="id" reporter:datatype="id"/>
3888                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
3889                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
3890                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3891                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
3892                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
3893                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
3894                 </fields>
3895                 <links>
3896                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
3897                 </links>
3898         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3899             <actions>
3900                 <create permission="ADMIN_PROVIDER">
3901                     <context link="provider" field="owner"/>
3902                 </create>
3903                 <retrieve permission="ADMIN_PROVIDER">
3904                     <context link="provider" field="owner"/>
3905                 </retrieve>
3906                 <update permission="ADMIN_PROVIDER">
3907                     <context link="provider" field="owner"/>
3908                 </update>
3909                 <delete permission="ADMIN_PROVIDER">
3910                     <context link="provider" field="owner"/>
3911                 </delete>
3912             </actions>
3913         </permacrud>
3914         </class>
3915
3916         <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">
3917                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
3918                         <field name="id" reporter:datatype="id"/>
3919                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
3920                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3921                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
3922                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
3923                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
3924         </fields>
3925                 <links>
3926                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
3927                 </links>
3928         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3929             <actions>
3930                 <create permission="ADMIN_PROVIDER">
3931                     <context link="provider" field="owner"/>
3932                 </create>
3933                 <retrieve permission="ADMIN_PROVIDER">
3934                     <context link="provider" field="owner"/>
3935                 </retrieve>
3936                 <update permission="ADMIN_PROVIDER">
3937                     <context link="provider" field="owner"/>
3938                 </update>
3939                 <delete permission="ADMIN_PROVIDER">
3940                     <context link="provider" field="owner"/>
3941                 </delete>
3942             </actions>
3943         </permacrud>
3944     </class>
3945         <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">
3946                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
3947                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3948                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3949                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3950                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3951                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3952                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3953                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3954                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3955                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3956                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
3957                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3958                 </fields>
3959                 <links>
3960                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
3961                 </links>
3962         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3963             <actions>
3964                 <create permission="ADMIN_PROVIDER">
3965                     <context link="contact" jump='provider' field="owner"/>
3966                 </create>
3967                 <retrieve permission="ADMIN_PROVIDER">
3968                     <context link="contact" jump='provider' field="owner"/>
3969                 </retrieve>
3970                 <update permission="ADMIN_PROVIDER">
3971                     <context link="contact" jump='provider' field="owner"/>
3972                 </update>
3973                 <delete permission="ADMIN_PROVIDER">
3974                     <context link="contact" jump='provider' field="owner"/>
3975                 </delete>
3976             </actions>
3977         </permacrud>
3978         </class>
3979
3980         <class id="acqfc" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_calendar" oils_persist:tablename="acq.fiscal_calendar" reporter:label="Fiscal Calendar">
3981                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
3982                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='id'/>
3983                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
3984                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
3985                 </fields>
3986                 <links>
3987             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
3988                 </links>
3989                 <!--
3990                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
3991                         But here's what it should look like if we ever do use pcrud.
3992                 -->
3993                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3994                         <actions>
3995                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
3996                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
3997                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
3998                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
3999                         </actions>
4000                 </permacrud>
4001         </class>
4002
4003         <class id="acqfy" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_year" oils_persist:tablename="acq.fiscal_year" reporter:label="Fiscal Year">
4004                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
4005                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='id'/>
4006                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
4007                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
4008                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
4009                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
4010                 </fields>
4011                 <links>
4012                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
4013                 </links>
4014                 <!--
4015                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
4016                         But here's what it should look like if we ever do use pcrud.
4017                 -->
4018                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4019                         <actions>
4020                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4021                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4022                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4023                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4024                         </actions>
4025                 </permacrud>
4026         </class>
4027
4028         <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">
4029                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
4030                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
4031                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
4032                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
4033                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
4034                         <field reporter:label="Code" name="code" reporter:datatype="text" />
4035                         <field name="summary" oils_persist:virtual="true"/>
4036                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
4037                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
4038                 </fields>
4039                 <links>
4040                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
4041                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4042             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
4043             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
4044                 </links>
4045         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4046             <actions>
4047                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
4048                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
4049                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
4050                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
4051             </actions>
4052         </permacrud>
4053         </class>
4054
4055         <class id="acqfscred" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::funding_source_credit" oils_persist:tablename="acq.funding_source_credit" reporter:label="Credit to Funding Source">
4056                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
4057                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
4058                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
4059                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4060                         <field reporter:label="Note" name="note" reporter:datatype="text" />
4061                 </fields>
4062                 <links>
4063                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
4064                 </links>
4065         </class>
4066
4067         <class id="acqfdeb" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_debit" oils_persist:tablename="acq.fund_debit" reporter:label="Debit From Fund">
4068                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
4069                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
4070                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4071                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
4072                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
4073                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4074                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="text" />
4075                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
4076                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
4077                 </fields>
4078                 <links>
4079                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4080                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
4081                 </links>
4082         </class>
4083
4084         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
4085                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
4086                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
4087                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
4088                         <field reporter:label="Name" name="name" reporter:datatype="text" />
4089                         <field reporter:label="Year" name="year" reporter:datatype="int" />
4090                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
4091                         <field reporter:label="Code" name="code" reporter:datatype="text" />
4092                         <field name="summary" oils_persist:virtual="true"/>
4093                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
4094                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
4095                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
4096                 </fields>
4097                 <links>
4098                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4099                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
4100             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
4101             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
4102             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
4103                 </links>
4104         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4105             <actions>
4106                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
4107                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
4108                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
4109                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
4110             </actions>
4111         </permacrud>
4112         </class>
4113
4114         <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">
4115                 <fields oils_persist:primary="fund">
4116                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4117                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
4118                 </fields>
4119                 <links>
4120                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4121                 </links>
4122         </class>
4123
4124         <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">
4125                 <fields oils_persist:primary="fund">
4126                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4127                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
4128                 </fields>
4129                 <links>
4130                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4131                 </links>
4132         </class>
4133
4134         <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">
4135                 <fields oils_persist:primary="fund">
4136                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4137                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
4138                 </fields>
4139                 <links>
4140                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4141                 </links>
4142         </class>
4143
4144         <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">
4145                 <fields oils_persist:primary="fund">
4146                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4147                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
4148                 </fields>
4149                 <links>
4150                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4151                 </links>
4152         </class>
4153
4154         <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">
4155                 <fields oils_persist:primary="fund">
4156                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4157                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
4158                 </fields>
4159                 <links>
4160                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4161                 </links>
4162         </class>
4163
4164         <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">
4165                 <fields oils_persist:primary="funding_source">
4166                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
4167                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
4168                 </fields>
4169                 <links>
4170                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
4171                 </links>
4172         </class>
4173
4174         <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">
4175                 <fields oils_persist:primary="funding_source">
4176                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
4177                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
4178                 </fields>
4179                 <links>
4180                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
4181                 </links>
4182         </class>
4183
4184         <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">
4185                 <fields oils_persist:primary="funding_source">
4186                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
4187                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
4188                 </fields>
4189                 <links>
4190                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
4191                 </links>
4192         </class>
4193
4194         <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">
4195                 <fields oils_persist:primary="fund">
4196                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4197                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
4198                 </fields>
4199                 <links>
4200                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4201                 </links>
4202         </class>
4203
4204         <class id="acqfa" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_allocation" oils_persist:tablename="acq.fund_allocation" reporter:label="Fund Allocation">
4205                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
4206                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
4207                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
4208                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
4209                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4210                         <field reporter:label="Percent" name="percent" reporter:datatype="float" />
4211                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
4212                         <field reporter:label="Note" name="note" reporter:datatype="text" />
4213                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
4214                 </fields>
4215                 <links>
4216                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
4217                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4218                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
4219                 </links>
4220         </class>
4221
4222         <class id="acqpl" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Pick List">
4223                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
4224                         <field reporter:label="Picklist ID" name="id" reporter:datatype="id" />
4225                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
4226                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link" />
4227                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
4228                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
4229                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
4230                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
4231                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
4232                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
4233                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
4234                 </fields>
4235                 <links>
4236                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4237                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4238                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4239                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4240                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
4241                 </links>
4242         </class>
4243
4244         <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">
4245                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
4246                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" />
4247                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
4248                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
4249                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
4250                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
4251                         <field reporter:label="State" name="state" reporter:datatype="text" />
4252                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
4253                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
4254                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
4255                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
4256                         <field reporter:label="Name" name="name" reporter:datatype="text" />
4257                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
4258                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="link" />
4259                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
4260                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
4261                 </fields>
4262                 <links>
4263                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4264                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4265                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4266                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
4267                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4268                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
4269                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
4270                 </links>
4271                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4272                         <actions>
4273                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
4274                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
4275                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
4276                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
4277                         </actions>
4278                 </permacrud>
4279         </class>
4280
4281         <class id="acqpon" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::po_note" oils_persist:tablename="acq.po_note" reporter:label="PO Note">
4282                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
4283                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
4284                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
4285                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
4286                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
4287                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
4288                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
4289                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
4290                 </fields>
4291                 <links>
4292                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4293                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4294                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
4295                 </links>
4296         </class>
4297
4298         <class id="jub" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
4299                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
4300                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
4301                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
4302                         <field reporter:label="Picklist" name="picklist" reporter:datatype="link" />
4303                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
4304                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
4305                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
4306                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
4307                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
4308                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
4309                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
4310                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
4311                         <field reporter:label="State" name="state" reporter:datatype="text" />
4312                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
4313                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
4314                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
4315                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
4316                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
4317                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
4318                 </fields>
4319                 <links>
4320                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
4321                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4322                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4323                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4324                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
4325                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
4326                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
4327                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
4328                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
4329                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
4330                 </links>
4331         </class>
4332
4333         <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">
4334                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
4335                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
4336                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
4337                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
4338                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
4339                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
4340                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
4341                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
4342                 </fields>
4343                 <links>
4344                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4345                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4346                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
4347                 </links>
4348         </class>
4349
4350         <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">
4351                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
4352                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
4353                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
4354                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
4355                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
4356                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
4357                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
4358                 </fields>
4359                 <links>
4360                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
4361                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
4362                 </links>
4363         </class>
4364
4365         <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">
4366                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
4367                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
4368                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
4369                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
4370                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
4371                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
4372                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
4373                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
4374                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
4375                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
4376                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link" />
4377                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
4378                         <field reporter:label="Note" name="note" reporter:datatype="text" />
4379                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
4380                 </fields>
4381                 <links>
4382                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
4383                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
4384                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4385                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
4386                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4387                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4388                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4389                 </links>
4390         </class>
4391
4392         <class id="acqliad" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_attr_definition" oils_persist:tablename="acq.lineitem_attr_definition" reporter:label="Line Item Attribute Definition">
4393                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
4394                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
4395                         <field reporter:label="Code" name="code" reporter:datatype="text" />
4396                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
4397                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
4398                 </fields>
4399                 <links/>
4400         </class>
4401
4402         <class id="acqlimad" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_marc_attr_definition" oils_persist:tablename="acq.lineitem_marc_attr_definition" reporter:label="Line Item MARC Attribute Definition">
4403                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
4404                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
4405                         <field reporter:label="Code" name="code" reporter:datatype="text" />
4406                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
4407                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
4408                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
4409                 </fields>
4410                 <links/>
4411         </class>
4412
4413         <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">
4414                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
4415                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
4416                         <field reporter:label="Code" name="code" reporter:datatype="text" />
4417                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
4418                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
4419                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
4420                 </fields>
4421                 <links/>
4422         </class>
4423         <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">
4424                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
4425                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
4426                         <field reporter:label="Code" name="code" reporter:datatype="text" />
4427                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
4428                         <field reporter:label="User" name="usr" reporter:datatype="link" />
4429                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
4430                 </fields>
4431                 <links>
4432                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4433                 </links>
4434         </class>
4435
4436         <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">
4437             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
4438                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
4439                 <field reporter:label="Code" name="code" reporter:datatype="text" />
4440                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
4441                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
4442                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
4443                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
4444         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
4445
4446             </fields>
4447             <links>
4448                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4449             </links>
4450             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4451                 <actions>
4452                     <create permission="ADMIN_PROVIDER">
4453                         <context link="provider" field="owner"/>
4454                     </create>
4455                     <retrieve permission="ADMIN_PROVIDER">
4456                         <context link="provider" field="owner"/>
4457                     </retrieve>
4458                     <update permission="ADMIN_PROVIDER">
4459                         <context link="provider" field="owner"/>
4460                     </update>
4461                     <delete permission="ADMIN_PROVIDER">
4462                         <context link="provider" field="owner"/>
4463                     </delete>
4464                 </actions>
4465             </permacrud>
4466         </class>
4467         
4468         <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">
4469             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
4470                 <field reporter:label="ID" name="id" reporter:datatype="id" />
4471                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
4472                 <field reporter:label="Name" name="name" reporter:datatype="text" />
4473                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
4474             </fields>
4475             <links>
4476                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4477             </links>
4478             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4479                 <actions>
4480                     <create permission="ADMIN_PROVIDER">
4481                         <context link="provider" field="owner"/>
4482                     </create>
4483                     <retrieve permission="ADMIN_PROVIDER">
4484                         <context link="provider" field="owner"/>
4485                     </retrieve>
4486                     <update permission="ADMIN_PROVIDER">
4487                         <context link="provider" field="owner"/>
4488                     </update>
4489                     <delete permission="ADMIN_PROVIDER">
4490                         <context link="provider" field="owner"/>
4491                     </delete>
4492                 </actions>
4493             </permacrud>
4494         </class>
4495         
4496         <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">
4497             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
4498                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
4499                         <field reporter:label="Code" name="code" reporter:datatype="text" />
4500                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
4501                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
4502                 </fields>
4503                 <links/>
4504         </class>
4505
4506         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
4507                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
4508                         <field name="id" reporter:datatype="id" />
4509                         <field name="parent" reporter:datatype="link"/>
4510                         <field name="owner" reporter:datatype="link"/>
4511                         <field name="create_time" reporter:datatype="timestamp"/>
4512                         <field name="name" reporter:datatype="text"/>
4513                         <field name="shared" reporter:datatype="bool"/>
4514                         <field name="share_with" reporter:datatype="link"/>
4515                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
4516                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
4517                 </fields>
4518                 <links>
4519                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4520                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
4521                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
4522                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
4523                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
4524                 </links>
4525         </class>
4526         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
4527                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
4528                         <field name="id" reporter:datatype="id" />
4529                         <field name="parent" reporter:datatype="link"/>
4530                         <field name="owner" reporter:datatype="link"/>
4531                         <field name="create_time" reporter:datatype="timestamp"/>
4532                         <field name="name" reporter:datatype="text"/>
4533                         <field name="shared" reporter:datatype="bool"/>
4534                         <field name="share_with" reporter:datatype="link"/>
4535                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
4536                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
4537                 </fields>
4538                 <links>
4539                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4540                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
4541                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
4542                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
4543                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
4544                 </links>
4545         </class>
4546         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
4547                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
4548                         <field name="id" reporter:datatype="id" />
4549                         <field name="parent" reporter:datatype="link"/>
4550                         <field name="owner" reporter:datatype="link"/>
4551                         <field name="create_time" reporter:datatype="timestamp"/>
4552                         <field name="name" reporter:datatype="text"/>
4553                         <field name="shared" reporter:datatype="bool"/>
4554                         <field name="share_with" reporter:datatype="link"/>
4555                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
4556                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
4557                 </fields>
4558                 <links>
4559                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4560                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
4561                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
4562                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
4563                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
4564                 </links>
4565         </class>
4566         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
4567                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
4568                         <field name="id" reporter:datatype="id" />
4569                         <field name="owner" reporter:datatype="link"/>
4570                         <field name="create_time" reporter:datatype="timestamp"/>
4571                         <field name="name" reporter:datatype="text"/>
4572                         <field name="data" reporter:datatype="text"/>
4573                         <field name="folder" reporter:datatype="link"/>
4574                         <field name="description" reporter:datatype="text"/>
4575                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
4576                 </fields>
4577                 <links>
4578                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4579                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
4580                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
4581                 </links>
4582         </class>
4583         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
4584                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
4585                         <field name="id" reporter:datatype="id" />
4586                         <field name="owner" reporter:datatype="link"/>
4587                         <field name="create_time" reporter:datatype="timestamp"/>
4588                         <field name="template" reporter:datatype="link"/>
4589                         <field name="data" reporter:datatype="link"/>
4590                         <field name="folder" reporter:datatype="link"/>
4591                         <field name="recur" reporter:datatype="bool"/>
4592                         <field name="recurance" reporter:datatype="interval"/>
4593                         <field name="name" reporter:datatype="text"/>
4594                         <field name="description" reporter:datatype="text"/>
4595                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
4596                 </fields>
4597                 <links>
4598                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4599                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
4600                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
4601                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
4602                 </links>
4603         </class>
4604         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
4605                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
4606                         <field name="id" reporter:datatype="id" />
4607                         <field name="runner" reporter:datatype="link"/>
4608                         <field name="start_time" reporter:datatype="timestamp"/>
4609                         <field name="complete_time" reporter:datatype="timestamp"/>
4610                         <field name="run_time" reporter:datatype="timestamp"/>
4611                         <field name="email" reporter:datatype="text"/>
4612                         <field name="excel_format" reporter:datatype="bool"/>
4613                         <field name="csv_format" reporter:datatype="bool"/>
4614                         <field name="html_format" reporter:datatype="bool"/>
4615                         <field name="error_code" reporter:datatype="int"/>
4616                         <field name="error_text" reporter:datatype="text"/>
4617                         <field name="report" reporter:datatype="link"/>
4618                         <field name="folder" reporter:datatype="link"/>
4619                         <field name="chart_pie" reporter:datatype="bool"/>
4620                         <field name="chart_bar" reporter:datatype="bool"/>
4621                         <field name="chart_line" reporter:datatype="bool"/>
4622                 </fields>
4623                 <links>
4624                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
4625                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
4626                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
4627                 </links>
4628         </class>
4629         <class id="rmsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::materialized_simple_record" oils_persist:tablename="reporter.materialized_simple_record" reporter:label="Fast Simple Record Extracts">
4630                 <fields oils_persist:primary="id">
4631                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
4632                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
4633                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
4634                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
4635                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
4636                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
4637                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
4638                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
4639                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
4640                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
4641                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
4642                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
4643                 </fields>
4644                 <links>
4645                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
4646                 </links>
4647         </class>
4648         <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">
4649                 <fields oils_persist:primary="id">
4650                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
4651                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
4652                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
4653                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
4654                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
4655                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
4656                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
4657                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
4658                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
4659                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
4660                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
4661                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
4662                 </fields>
4663                 <links>
4664                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
4665                 </links>
4666         </class>
4667         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
4668                 <fields oils_persist:primary="id">
4669                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
4670                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
4671                         <field reporter:label="Fingerprint" name="fingerprint" />
4672                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
4673                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
4674                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
4675                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
4676                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
4677                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
4678                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
4679                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
4680                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
4681                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
4682                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
4683                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
4684                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
4685                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
4686                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
4687                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
4688                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
4689                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
4690                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
4691                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
4692                 </fields>
4693                 <links>
4694                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
4695                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
4696                 </links>
4697         </class>
4698         <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">
4699                 <fields oils_persist:primary="id">
4700                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
4701                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
4702                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
4703                 </fields>
4704                 <links>
4705                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
4706                 </links>
4707         </class>
4708         <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">
4709                 <fields oils_persist:primary="id">
4710                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
4711                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
4712                 </fields>
4713                 <links>
4714                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
4715                 </links>
4716         </class>
4717         <class id="rhrr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::hold_request_record" oils_persist:tablename="reporter.hold_request_record" reporter:label="Hold Request Record">
4718                 <fields oils_persist:primary="id">
4719                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
4720                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
4721                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
4722                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
4723                 </fields>
4724                 <links>
4725                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
4726                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
4727                 </links>
4728         </class>
4729         <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">
4730                 <fields oils_persist:primary="xact">
4731                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
4732                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
4733                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
4734                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
4735                 </fields>
4736                 <links>
4737                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
4738                 </links>
4739         </class>
4740         <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">
4741                 <fields oils_persist:primary="xact">
4742                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
4743                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
4744                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
4745                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
4746                 </fields>
4747                 <links>
4748                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
4749                 </links>
4750         </class>
4751         <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)">
4752                 <fields oils_persist:primary="id">
4753                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
4754                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
4755                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
4756                 </fields>
4757                 <links>
4758                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
4759                 </links>
4760         </class>
4761         <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">
4762                 <fields oils_persist:primary="id">
4763                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
4764                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
4765                 </fields>
4766                 <links>
4767                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
4768                 </links>
4769         </class>
4770         <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">
4771                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
4772                         <field reporter:label="Formula ID" name="id" reporter:datatype="id"/>
4773                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
4774                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
4775                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
4776                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4777                 </fields>
4778                 <links>
4779                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4780                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
4781                 </links>
4782                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4783                         <actions>
4784                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
4785                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
4786                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
4787                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
4788                         </actions>
4789                 </permacrud>
4790         </class>
4791         <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">
4792                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
4793                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
4794                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
4795                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
4796                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
4797                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4798                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
4799                 </fields>
4800                 <links>
4801                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
4802                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4803                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4804                 </links>
4805                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4806                         <actions>
4807                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
4808                                         <context link="formula" field="owner"/>
4809                                 </create>
4810                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
4811                                         <context link="formula" field="owner"/>
4812                                 </retrieve>
4813                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
4814                                         <context link="formula" field="owner"/>
4815                                 </update>
4816                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
4817                                         <context link="formula" field="owner"/>
4818                                 </delete>
4819                         </actions>
4820                 </permacrud>
4821         </class>
4822
4823     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
4824         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
4825             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
4826             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
4827             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
4828             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
4829             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
4830             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
4831             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
4832             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
4833             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
4834             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
4835             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
4836             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
4837             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
4838             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
4839             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
4840         </fields>
4841     </class>
4842
4843     <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">
4844         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
4845             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
4846             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
4847             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
4848             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4849             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
4850         </fields>
4851     </class>
4852
4853     <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">
4854         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
4855             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
4856             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
4857             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
4858             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
4859             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
4860             <field reporter:label="City" name="city" reporter:datatype="text"/>
4861             <field reporter:label="State" name="state" reporter:datatype="text"/>
4862             <field reporter:label="Country" name="country" reporter:datatype="text"/>
4863             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4864             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
4865         </fields>
4866     </class>
4867
4868     <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">
4869         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
4870             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
4871             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
4872             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
4873             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
4874             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
4875             <field reporter:label="City" name="city" reporter:datatype="text"/>
4876             <field reporter:label="State" name="state" reporter:datatype="text"/>
4877             <field reporter:label="Country" name="country" reporter:datatype="text"/>
4878             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4879             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
4880         </fields>
4881     </class>
4882
4883     <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">
4884         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
4885             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
4886             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
4887             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
4888             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
4889             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
4890             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
4891         </fields>
4892     </class>
4893
4894     <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">
4895                 <oils_persist:source_definition>
4896
4897             SELECT  u.hold,
4898                     c.circ_lib,
4899                     count(*)
4900               FROM  action.unfulfilled_hold_list u
4901                     JOIN asset.copy c ON (c.id = u.current_copy)
4902               GROUP BY 1,2
4903
4904                 </oils_persist:source_definition>
4905         <fields>
4906             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
4907             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
4908             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
4909         </fields>
4910                 <links>
4911                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4912                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4913                 </links>
4914     </class>
4915
4916     <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">
4917                 <oils_persist:source_definition>
4918
4919             SELECT  hold,
4920                     min(count)
4921               FROM  action.unfulfilled_hold_loops
4922               GROUP BY 1
4923
4924                 </oils_persist:source_definition>
4925         <fields>
4926             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
4927             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
4928         </fields>
4929                 <links>
4930                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4931                 </links>
4932     </class>
4933
4934     <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">
4935                 <oils_persist:source_definition>
4936
4937             SELECT  DISTINCT l.*
4938               FROM  action.unfulfilled_hold_loops l
4939                     JOIN action.unfulfilled_hold_min_loop m USING (hold)
4940               WHERE l.count = m.min
4941
4942                 </oils_persist:source_definition>
4943         <fields>
4944             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
4945             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
4946             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
4947         </fields>
4948                 <links>
4949                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4950                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4951                 </links>
4952     </class>
4953
4954     <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">
4955                 <oils_persist:source_definition>
4956
4957             SELECT  hold,
4958                     max(count)
4959               FROM  action.unfulfilled_hold_loops
4960               GROUP BY 1
4961
4962                 </oils_persist:source_definition>
4963         <fields>
4964             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
4965             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
4966         </fields>
4967                 <links>
4968                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4969                 </links>
4970     </class>
4971
4972     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:tablename="action.unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
4973                 <oils_persist:source_definition>
4974
4975             SELECT  DISTINCT l.*
4976               FROM  action.unfulfilled_hold_loops l
4977                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
4978               WHERE l.count = m.max
4979
4980                 </oils_persist:source_definition>
4981         <fields>
4982             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
4983             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
4984             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
4985         </fields>
4986                 <links>
4987                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4988                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4989                 </links>
4990     </class>
4991
4992
4993         <!-- ********************************************************************************************************************* -->
4994         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
4995         <!-- ********************************************************************************************************************* -->
4996         <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">
4997                 <fields oils_persist:primary="id">
4998                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
4999                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
5000                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
5001                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5002                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
5003                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
5004                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
5005                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
5006                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
5007                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
5008                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
5009                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
5010                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
5011                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
5012                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
5013                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
5014                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
5015                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
5016                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
5017                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
5018                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
5019                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
5020                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
5021                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
5022                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
5023                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
5024                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
5025                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
5026                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
5027                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
5028                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
5029                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
5030                 </fields>
5031                 <links>
5032                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
5033                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
5034                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
5035                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
5036                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5037                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
5038                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
5039                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
5040                 </links>
5041         </class>
5042
5043         <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">
5044                 <fields oils_persist:primary="id">
5045                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
5046                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5047                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
5048                 </fields>
5049                 <links>
5050                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5051                 </links>
5052         </class>
5053
5054         <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">
5055                 <fields oils_persist:primary="id">
5056                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
5057                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5058                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
5059                 </fields>
5060                 <links>
5061                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5062                 </links>
5063         </class>
5064
5065         <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">
5066                 <fields oils_persist:primary="id">
5067                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5068
5069                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
5070                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
5071                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
5072
5073                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
5074                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
5075                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
5076
5077                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
5078                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
5079
5080                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5081                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5082                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
5083
5084                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
5085                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
5086
5087                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
5088                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
5089                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
5090
5091                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
5092                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
5093                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
5094
5095                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
5096                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
5097                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
5098                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
5099
5100                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
5101                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
5102
5103                 </fields>
5104                 <links>
5105                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
5106                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5107                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
5108                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5109                 </links>
5110         </class>
5111
5112         <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">
5113                 <oils_persist:source_definition>
5114
5115                         SELECT  t.*
5116                           FROM  action.transit_copy t
5117                                 JOIN actor.org_unit AS s ON (t.source = s.id)
5118                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
5119                           WHERE s.parent_ou &lt;&gt; d.parent_ou
5120
5121                 </oils_persist:source_definition>
5122                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
5123                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
5124                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
5125                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
5126                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
5127                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
5128                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
5129                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
5130                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
5131                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
5132                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
5133                 </fields>
5134                 <links>
5135                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
5136                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
5137                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
5138                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
5139                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5140                 </links>
5141         </class>
5142
5143     <class id="circbyyr" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
5144                 <oils_persist:source_definition>
5145
5146         SELECT id, SUM(count) AS count, year, is_renewal FROM (
5147                 SELECT
5148                         cp.id,
5149                         COUNT(circ.id),
5150                         EXTRACT(YEAR FROM circ.xact_start) AS year,
5151                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
5152                 FROM
5153                         asset.copy cp
5154                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
5155                 GROUP BY 1, 3, 4
5156                 UNION
5157                 SELECT
5158                         cp.id,
5159                         COUNT(circ.id),
5160                         EXTRACT(YEAR FROM circ.xact_start) AS year,
5161                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
5162                 FROM
5163                         asset.copy cp
5164                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
5165                 GROUP BY 1, 3, 4
5166                 UNION
5167                 SELECT
5168                         id,
5169                         circ_count,
5170                         -1 AS year,
5171                         false as is_renewal
5172                 FROM
5173                         extend_reporter.legacy_circ_count
5174         )x GROUP BY 1, 3, 4
5175
5176                 </oils_persist:source_definition>
5177         <fields>
5178             <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
5179             <field reporter:label="Count" name="count" reporter:datatype="int"/>
5180             <field reporter:label="Year" name="year" reporter:datatype="int"/>
5181             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
5182         </fields>
5183                 <links>
5184                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
5185                 </links>
5186     </class>
5187
5188         <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">
5189                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5190                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
5191                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
5192                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
5193                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5194                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
5195                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
5196                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
5197                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
5198                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
5199                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5200                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
5201                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
5202                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
5203                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
5204                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
5205                         <field reporter:label="Recurring Fine Amount" name="recuring_fine" reporter:datatype="money" />
5206                         <field reporter:label="Recurring Fine Rule" name="recuring_fine_rule" reporter:datatype="link"/>
5207                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
5208                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
5209                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
5210                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
5211                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
5212                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
5213                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
5214                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5215                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5216                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5217                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
5218                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5219                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5220                 </fields>
5221                 <links>
5222                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5223                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
5224                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
5225                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5226                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
5227                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5228                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5229                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5230                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5231                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5232                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5233                         <link field="recuring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5234                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
5235                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5236                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5237                 </links>
5238         </class>
5239
5240     <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">
5241         <fields oils_persist:primary="id">
5242             <field reporter:label="Title" name="title" reporter:datatype="text"/>
5243             <field reporter:label="Author" name="author" reporter:datatype="text"/>
5244             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
5245             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
5246             <field reporter:label="Price" name="price" reporter:datatype="money"/>
5247             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5248             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
5249             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
5250             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
5251             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
5252             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
5253             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
5254             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
5255             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
5256             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
5257             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
5258             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5259             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5260             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
5261             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
5262             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
5263             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
5264             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5265             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
5266             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5267             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
5268             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
5269             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
5270             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
5271             <field reporter:label="Status" name="status" reporter:datatype="link"/>
5272             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
5273             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
5274             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
5275             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
5276         </fields>
5277         <links>
5278             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5279             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5280             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5281             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5282             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5283         </links>
5284     </class>
5285
5286     <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">
5287         <fields oils_persist:primary="id">
5288             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
5289             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
5290             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
5291             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
5292         </fields>
5293         <links>
5294             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
5295             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5296         </links>
5297     </class>
5298
5299     <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">
5300         <fields oils_persist:primary="owning_lib">
5301             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
5302             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
5303             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
5304         </fields>
5305         <links>
5306             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5307         </links>
5308     </class>
5309
5310     <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">
5311         <fields oils_persist:primary="id">
5312             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
5313             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
5314             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
5315             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
5316             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
5317         </fields>
5318         <links>
5319             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
5320             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5321             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5322         </links>
5323     </class>
5324
5325     <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">
5326         <fields oils_persist:primary="circ_lib">
5327             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
5328             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
5329             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
5330             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
5331         </fields>
5332         <links>
5333             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5334             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5335         </links>
5336     </class>
5337
5338     <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">
5339         <fields oils_persist:primary="id">
5340             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
5341             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
5342             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
5343             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
5344             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
5345         </fields>
5346         <links>
5347             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
5348             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5349             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
5350         </links>
5351     </class>
5352
5353     <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">
5354         <fields oils_persist:primary="home_ou">
5355             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
5356             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
5357             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
5358             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
5359         </fields>
5360         <links>
5361             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5362             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
5363         </links>
5364     </class>
5365         <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">
5366                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
5367                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
5368                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
5369                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
5370                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5371                 </fields>
5372                 <links>
5373                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5374                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
5375                 </links>
5376                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5377                         <actions>
5378                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
5379                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
5380                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
5381                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
5382                         </actions>
5383                 </permacrud>
5384         </class>
5385         <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">
5386                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
5387                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
5388                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
5389                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
5390                 </fields>
5391                 <links>
5392                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5393                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
5394                         </links>
5395                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5396                 <actions>
5397                                 <create permission="ADMIN_ACQ_FUND_TAG">
5398                                         <context link="tag" field="owner"/>
5399                                 </create>
5400                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
5401                                         <context link="tag" field="owner"/>
5402                                 </retrieve>
5403                                 <update permission="ADMIN_ACQ_FUND_TAG">
5404                                         <context link="tag" field="owner"/>
5405                                 </update>
5406                                 <delete permission="ADMIN_ACQ_FUND_TAG">
5407                                         <context link="tag" field="owner"/>
5408                                 </delete>
5409                         </actions>
5410                 </permacrud>
5411         </class>
5412
5413         <!-- ********************************************************************************************************************* -->
5414
5415 </IDL>
5416
5417 <!--
5418     vim:noet:ts=4:sw=4:
5419 -->