<class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
<fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
<field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
- <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
- <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
- <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
- <field reporter:label="Code" name="code" reporter:datatype="text" />
+ <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
+ <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
+ <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" oils_obj:required="true"/>
+ <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true"/>
<field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
<field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
<field reporter:label="SAN" name="san" reporter:datatype="text" />
<field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
<field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
<field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
+ <field reporter:label="Primary Contact" name="primary_contact" reporter:datatype="link" />
+ <field reporter:label="Contacts" name="contacts" oils_persist:virtual="true" reporter:datatype="link" />
<field reporter:label="Notes" name="provider_notes" oils_persist:virtual="true" reporter:datatype="link" />
+ <field reporter:label="Holdings Subfields" name="holdings_subfields" oils_persist:virtual="true" reporter:datatype="link" />
+ <field reporter:label="Attribute Definitions" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
+ <field reporter:label="EDI Accounts" name="edi_accounts" oils_persist:virtual="true" reporter:datatype="link" />
</fields>
<links>
<link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
<link field="owner" reltype="has_a" key="id" map="" class="aou"/>
- <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
- <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
+ <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
+ <link field="contacts" reltype="has_many" map="" key="provider" class="acqpc"/>
+ <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
+ <link field="primary_contact" reltype="has_a" map="" key="id" class="acqpc"/>
<link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
<link field="provider_notes" reltype="has_many" map="" key="provider" class="acqpron"/>
+ <link field="holdings_subfields" reltype="has_many" map="" key="provider" class="acqphsm"/>
+ <link field="attributes" reltype="has_many" map="" key="provider" class="acqlipad"/>
+ <link field="edi_accounts" reltype="has_many" map="" key="provider" class="acqedi"/>
</links>
<permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
<actions>
<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">
<fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
<field reporter:label="Address Type" name="address_type" reporter:datatype="text"/>
- <field reporter:label="City" name="city" reporter:datatype="text"/>
- <field reporter:label="Country" name="country" reporter:datatype="text"/>
+ <field reporter:label="City" name="city" reporter:datatype="text" oils_obj:required="true"/>
+ <field reporter:label="Country" name="country" reporter:datatype="text" oils_obj:required="true"/>
<field reporter:label="County" name="county" reporter:datatype="text"/>
<field reporter:label="ID" name="id" reporter:datatype="id"/>
<field reporter:label="Provider" name="provider" reporter:datatype="link"/>
- <field reporter:label="Post Code" name="post_code" reporter:datatype="text"/>
- <field reporter:label="State" name="state" reporter:datatype="text"/>
- <field reporter:label="Street 1" name="street1" reporter:datatype="text"/>
+ <field reporter:label="Post Code" name="post_code" reporter:datatype="text" oils_obj:required="true"/>
+ <field reporter:label="State" name="state" reporter:datatype="text" oils_obj:required="true"/>
+ <field reporter:label="Street 1" name="street1" reporter:datatype="text" oils_obj:required="true"/>
<field reporter:label="Street 2" name="street2" reporter:datatype="text"/>
<field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
<field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
<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">
<fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
<field reporter:label="ID" name="id" reporter:datatype="id"/>
- <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
- <field reporter:label="Name" name="name" reporter:datatype="text"/>
+ <field reporter:label="Provider" name="provider" reporter:datatype="link" oils_obj:required="true"/>
+ <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
<field reporter:label="Role" name="role" reporter:datatype="text"/>
<field reporter:label="Email" name="email" reporter:datatype="text"/>
<field reporter:label="Phone" name="phone" reporter:datatype="text"/>
+ <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
</fields>
<links>
+ <link field="addresses" reltype="has_many" key="contact" map="" class="acqpca"/>
<link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
</links>
<permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
<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">
<fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
<field reporter:label="Type" name="address_type" reporter:datatype="text"/>
- <field reporter:label="City" name="city" reporter:datatype="text"/>
- <field reporter:label="Country" name="country" reporter:datatype="text"/>
+ <field reporter:label="City" name="city" reporter:datatype="text" oils_obj:required="true"/>
+ <field reporter:label="Country" name="country" reporter:datatype="text" oils_obj:required="true"/>
<field reporter:label="County" name="county" reporter:datatype="text"/>
<field reporter:label="Address ID" name="id" reporter:datatype="id" />
- <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
- <field reporter:label="State" name="state" reporter:datatype="text"/>
- <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
+ <field reporter:label="Postal Code" name="post_code" reporter:datatype="text" oils_obj:required="true"/>
+ <field reporter:label="State" name="state" reporter:datatype="text" oils_obj:required="true"/>
+ <field reporter:label="Street (1)" name="street1" reporter:datatype="text" oils_obj:required="true"/>
<field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
- <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
+ <field reporter:label="Contact" name="contact" reporter:datatype="link" oils_obj:required="true"/>
<field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
<field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
</fields>
<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">
<fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
<field reporter:label="Definition ID" name="id" reporter:datatype="id" />
- <field reporter:label="Code" name="code" reporter:datatype="text" />
- <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
- <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
- <field reporter:label="Provider" name="provider" reporter:datatype="link" />
+ <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true" />
+ <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
+ <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true" />
+ <field reporter:label="Provider" name="provider" reporter:datatype="link" oils_obj:required="true" />
<field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
<field reporter:label="Remove" name="remove" reporter:datatype="text" />
<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">
<fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
<field reporter:label="ID" name="id" reporter:datatype="id" />
- <field reporter:label="Provider" name="provider" reporter:datatype="link" />
- <field reporter:label="Name" name="name" reporter:datatype="text" />
- <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
+ <field reporter:label="Provider" name="provider" reporter:datatype="link" oils_obj:required="true" />
+ <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true" />
+ <field reporter:label="Subfield" name="subfield" reporter:datatype="text" oils_obj:required="true" />
</fields>
<links>
<link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
<class id="acqedi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::edi_account" oils_persist:tablename="acq.edi_account" reporter:label="EDI Account">
<fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
<field name="id" reporter:datatype="id" reporter:label="EDI Account ID" reporter:selector="label"/>
- <field name="label" reporter:datatype="text" reporter:label="Label"/>
- <field name="host" reporter:datatype="text" reporter:label="Host"/>
+ <field name="label" reporter:datatype="text" reporter:label="Label" oils_obj:required="true"/>
+ <field name="host" reporter:datatype="text" reporter:label="Host" oils_obj:required="true"/>
<field name="username" reporter:datatype="text" reporter:label="Username"/>
<field name="password" reporter:datatype="text" reporter:label="Password"/>
<field name="account" reporter:datatype="text" reporter:label="Account"/>
<field name="path" reporter:datatype="text" reporter:label="Path"/>
- <field name="owner" reporter:datatype="link" reporter:label="Owner"/>
+ <field name="owner" reporter:datatype="link" reporter:label="Owner" oils_obj:required="true"/>
<field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
- <field name="provider" reporter:datatype="link" reporter:label="Provider"/>
+ <field name="provider" reporter:datatype="link" reporter:label="Provider" oils_obj:required="true"/>
<field name="in_dir" reporter:datatype="text" reporter:label="Incoming Directory"/>
<field name="vendacct" reporter:datatype="text" reporter:label="Vendor Account Number"/>
<field name="vendcode" reporter:datatype="text" reporter:label="Vendor Assigned Code"/>
<field name="attr_set" reporter:datatype="link" reporter:label="EDI Attribute Set"/>
- <field name="use_attrs" reporter:datatype="bool" reporter:label="Use EDI Attributes"/>
+ <field name="use_attrs" reporter:datatype="bool" reporter:label="Use EDI Attributes" oils_obj:required="true"/>
</fields>
<links>
<link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>