<link field="id" reltype="might_have" key="digital_services_id" map="" class="ebook_rdsa"/>
</links>
</class>
- <class id="ebook_rl" controller="open-ils.cstore open-ils.pcrud"
- oils_obj:fieldmapper="extra::rbdigital::library"
- oils_persist:tablename="extra.rbdigital_library"
- reporter:label="RBDigital Library">
- <fields oils_persist:sequence="extra.rbdigital_library_id_seq" oils_persist:primary="id">
- <field reporter:label="Id" name="id" reporter:datatype="id" />
- <field reporter:label="Home Library ID" name="home_ou" reporter:datatype="link" />
- <field reporter:label="Home Library URL" name="home_library_url" reporter:datatype="text" />
- <field reporter:label="Created Timestamp" name="created_timestamp" reporter:datatype="timestamp" />
- <field reporter:label="Updated Timestamp" name="updated_timestamp" reporter:datatype="timestamp" />
- </fields>
- <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
- <actions>
- <create global_required="true"/>
- <retrieve/>
- <update global_required="true"/>
- <delete global_required="true"/>
- </actions>
- </permacrud>
- <links>
- <link field="home_ou" reltype="has_a" class="au" key="home_ou" map="" />
- </links>
- </class>
<class id="ebook_rdsa" controller="open-ils.cstore open-ils.pcrud"
oils_persist:tablename="extra.rbdigital_digital_services_authorized"
oils_obj:fieldmapper="extra::rbdigital::digital_services_authorized"
reporter:label="RBDigital Digital Services Authorized">
<fields oils_persist:sequence="extra.rbdigital_digital_services_authorized_id_seq" oils_persist:primary="id">
<field reporter:label="Id" name="id" reporter:datatype="id" />
- <field reporter:label="Library Id" name="library_id" reporter:datatype="link" />
+ <field reporter:label="Library Id" name="library_id" reporter:datatype="id" />
<field reporter:label="Home Library ID" name="home_ou" reporter:datatype="link" />
<field reporter:label="DS Id" name="digital_services_id" reporter:datatype="link" />
<field reporter:label="DS Library Id" name="digital_services_library_id" reporter:datatype="id" />
</fields>
<links>
<link field="digital_services_id" reltype="has_a" class="ebook_rds" key="id" map="" />
- <link field="library_id" reltype="has_a" class="ebook_rl" key="id" map="" />
<link field="home_ou" reltype="has_a" class="au" key="home_ou" map="" />
</links>
<permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
INSERT INTO extra.rbdigital_digital_services (id, name, is_enabled, search_uri, vendor_key, display_order) VALUES (1, 'Evergreen', true, '/results', 'default', 1);
INSERT INTO extra.rbdigital_digital_services (id, name, is_enabled, search_uri, vendor_key, display_order) VALUES (2, 'RBdigital', true, '/ebook_api/rbdigital/results', 'rbdigital', 2);
-CREATE TABLE extra.rbdigital_library (
- home_library_url CHARACTER VARYING(250),
- created_timestamp TIMESTAMP(6) WITH TIME ZONE DEFAULT now(),
- updated_timestamp TIMESTAMP(6) WITH TIME ZONE DEFAULT now(),
- id SERIAL PRIMARY KEY,
- home_ou INTEGER NOT NULL REFERENCES actor.org_unit(id)
-);
-COMMENT ON TABLE extra.rbdigital_library IS 'A table defining each entity that may purchase titles.';
-
CREATE TABLE extra.rbdigital_digital_services_authorized (
digital_services_id SMALLSERIAL PRIMARY KEY,
digital_services_library_id CHARACTER VARYING(64),
digital_services_name CHARACTER VARYING(20),
digital_services_library_url CHARACTER VARYING(250),
id SERIAL NOT NULL,
- library_id INTEGER REFERENCES extra.rbdigital_library(id),
+ library_id INTEGER,
home_ou INTEGER
);
COMMENT ON TABLE extra.rbdigital_digital_services_authorized IS 'A table listing the digital services authorized for each entity listed in the library table described above.';
INSERT INTO extra.rbdigital_digital_services (id, name, is_enabled, search_uri, vendor_key, display_order) VALUES (1, 'Evergreen', true, '/results', 'default', 1);
INSERT INTO extra.rbdigital_digital_services (id, name, is_enabled, search_uri, vendor_key, display_order) VALUES (2, 'RBdigital', true, '/ebook_api/rbdigital/results', 'rbdigital', 2);
-CREATE TABLE extra.rbdigital_library (
- home_library_url CHARACTER VARYING(250),
- created_timestamp TIMESTAMP(6) WITH TIME ZONE DEFAULT now(),
- updated_timestamp TIMESTAMP(6) WITH TIME ZONE DEFAULT now(),
- id SERIAL PRIMARY KEY,
- home_ou INTEGER NOT NULL REFERENCES actor.org_unit(id)
-);
-COMMENT ON TABLE extra.rbdigital_library IS 'A table defining each entity that may purchase titles.';
-
CREATE TABLE extra.rbdigital_digital_services_authorized (
digital_services_id SMALLSERIAL PRIMARY KEY,
digital_services_library_id CHARACTER VARYING(64),
digital_services_name CHARACTER VARYING(20),
digital_services_library_url CHARACTER VARYING(250),
id SERIAL NOT NULL,
- library_id INTEGER REFERENCES extra.rbdigital_library(id),
+ library_id INTEGER,
home_ou INTEGER
);
COMMENT ON TABLE extra.rbdigital_digital_services_authorized IS 'A table listing the digital services authorized for each entity listed in the library table described above.';