<?xml version="1.0" encoding="UTF-8"?>
<domain-models xmlns="http://axelor.com/xml/ns/domain-models" 
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
	xsi:schemaLocation="http://axelor.com/xml/ns/domain-models http://axelor.com/xml/ns/domain-models/domain-models_5.2.xsd">
	
  <module name="bank-payment" package="com.axelor.apps.bankpayment.db"/>
  
  <entity name="EbicsPartner" lang="java">
  
  	<integer name="ebicsTypeSelect" title="Mode" selection="bankpayment.ebics.partner.ebics.type.select"/>
  
    <many-to-one name="ebicsBank" ref="com.axelor.apps.bankpayment.db.EbicsBank" title="Ebics bank" required="true"/>
    <string name="partnerId" title="Partner id" namecolumn="true" max="35" required="true"/>
    <many-to-one name="defaultSignatoryEbicsUser" ref="com.axelor.apps.bankpayment.db.EbicsUser" title="Default signatory"/>

	<datetime name="bankStatementLastExeDateT" title="Date of last execution"/>
	<integer name="bankStatementGetModeSelect" title="Get mode" selection="bankpayment.ebics.bank.bank.statement.period.mode.select" default="1"/>
	<date name="bankStatementStartDate" title="Start date"/>
	<date name="bankStatementEndDate" title="End date"/>
	<many-to-one name="transportEbicsUser" ref="com.axelor.apps.bankpayment.db.EbicsUser" title="Ebics user for transport"/>
	
	<many-to-many name="bankDetailsSet" ref="com.axelor.apps.base.db.BankDetails" title="Bank accounts"/>
	
    <many-to-one name="pSRBankStatementFileFormat" ref="com.axelor.apps.bankpayment.db.BankStatementFileFormat" title="Payment Status Report file format"/>
	<boolean name="usePSR" title="Enable PSR"/>
	
	<boolean name="testMode" title="Test mode"/>

	<boolean name="filterReceiverBD" default="false" title="Filter receiver bank details"/>
	<integer name="orderTypeSelect" selection="bankpayment.bank.order.type.select" title="Order type to filter"/>
	<many-to-many name="receiverBankDetailsSet" ref="com.axelor.apps.base.db.BankDetails" title="Authorized Bank Accounts"/>

    <one-to-many name="boEbicsPartnerServiceList" ref="com.axelor.apps.bankpayment.db.EbicsPartnerService"
        mappedBy="bankOrderEbicsPartner" title="Bank order services" />
        
   	<one-to-many name="bsEbicsPartnerServiceList" ref="com.axelor.apps.bankpayment.db.EbicsPartnerService"
        mappedBy="bankStatementEbicsPartner" title="Bank statement services" />

	<extra-code><![CDATA[
	
	   	// BANK STATEMENT GET MODE SELECT
		public static final int GET_MODE_AUTOMATIC = 1;
		public static final int GET_MODE_PERIOD = 2;
		
		// EBICS TYPE SELECT
		public static final int EBICS_TYPE_T = 0;
		public static final int EBICS_TYPE_TS = 1;
	]]></extra-code>
    
  </entity>
  
</domain-models>
