user feedback for catalog records - database
authorGalen Charlton <gmc@equinoxinitiative.org>
Tue, 1 May 2018 04:56:10 +0000 (00:56 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Tue, 1 May 2018 04:56:10 +0000 (00:56 -0400)
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/examples/fm_IDL.xml
Open-ILS/src/sql/Pg/010.schema.biblio.sql

index b272b9f..04583c8 100644 (file)
@@ -3205,6 +3205,27 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
             </actions>
         </permacrud>
        </class>
+    <class id="brf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::record_feedback" oils_persist:tablename="biblio.record_feedback" reporter:label="Bibliographic Record Feedback">
+        <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_feedback_id_seq">
+            <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
+            <field reporter:label="Create Date" name="create_date" reporter:datatype="text"/>
+                       <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
+            <field reporter:label="Acknowledged" name="acked" reporter:datatype="bool"/>
+            <field reporter:label="Value" name="value" reporter:datatype="text"/>
+        </fields>
+        <links>
+            <link field="record" reltype="has_a" key="id" map="" class="bre"/>
+        </links>
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
+            <actions>
+                <create permission="UPDATE_MARC" global_required="true"/>
+                <retrieve permission="UPDATE_MARC" global_required="true"/>
+                <update permission="UPDATE_MARC" global_required="true"/>
+                <delete permission="UPDATE_MARC" global_required="true"/>
+            </actions>
+        </permacrud>
+    </class>
+
        <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">
                <fields oils_persist:primary="id">
                        <field name="dow_0_close" />
index 857307e..ec0097a 100644 (file)
@@ -123,4 +123,13 @@ $$ LANGUAGE PLPGSQL;
 
 CREATE TRIGGER norm_sort_label BEFORE INSERT OR UPDATE ON biblio.monograph_part FOR EACH ROW EXECUTE PROCEDURE biblio.normalize_biblio_monograph_part_sortkey();
 
+CREATE TABLE biblio.record_feedback (
+    id              SERIAL PRIMARY KEY,
+    create_date     TIMESTAMP WITH TIME ZONE    NOT NULL DEFAULT now(),
+    record          BIGINT  NOT NULL REFERENCES biblio.record_entry (id),
+    acked           BOOLEAN NOT NULL DEFAULT FALSE,
+    value           TEXT
+);
+CREATE INDEX biblio_record_feedback_record_idx ON biblio.record_feedback (record);
+
 COMMIT;