<?xml version="1.0" encoding="iso-8859-1" ?>

<table>
  <base>CRM/Price</base>
  <class>PriceFieldValue</class>
  <name>civicrm_price_field_value</name>
  <add>3.3</add>
  <component>CiviContribute</component>
  <paths>
    <add>civicrm/admin/price/field/option/edit?reset=1&amp;action=add&amp;fid=[price_field_id]&amp;sid=[price_field_id.price_set_id]</add>
    <view>civicrm/admin/price/field/option/edit?reset=1&amp;action=view&amp;oid=[id]&amp;fid=[price_field_id]&amp;sid=[price_field_id.price_set_id]</view>
    <update>civicrm/admin/price/field/option/edit?reset=1&amp;action=update&amp;oid=[id]&amp;fid=[price_field_id]&amp;sid=[price_field_id.price_set_id]</update>
    <delete>civicrm/admin/price/field/option/edit?reset=1&amp;action=delete&amp;oid=[id]&amp;fid=[price_field_id]&amp;sid=[price_field_id.price_set_id]</delete>
    <browse>civicrm/admin/price/field/option</browse>
  </paths>
  <field>
    <name>id</name>
    <title>Price Field Value ID</title>
    <type>int unsigned</type>
    <required>true</required>
    <comment>Price Field Value</comment>
    <html>
      <type>Number</type>
    </html>
    <add>3.3</add>
  </field>
  <primaryKey>
    <name>id</name>
    <autoincrement>true</autoincrement>
  </primaryKey>
  <field>
    <name>price_field_id</name>
    <title>Price Field ID</title>
    <type>int unsigned</type>
    <required>true</required>
    <comment>FK to civicrm_price_field</comment>
    <html>
      <type>EntityRef</type>
      <label>Price Field</label>
    </html>
    <add>3.3</add>
  </field>
  <foreignKey>
    <name>price_field_id</name>
    <table>civicrm_price_field</table>
    <key>id</key>
    <add>3.3</add>
  </foreignKey>
  <field>
    <name>name</name>
    <type>varchar</type>
    <title>Name</title>
    <length>255</length>
    <comment>Price field option name</comment>
    <html>
      <type>Text</type>
    </html>
    <add>3.3</add>
    <default>NULL</default>
  </field>
  <field>
    <name>label</name>
    <type>varchar</type>
    <title>Label</title>
    <length>255</length>
    <localizable>true</localizable>
    <comment>Price field option label</comment>
    <html>
      <type>Text</type>
    </html>
    <add>3.3</add>
    <default>NULL</default>
  </field>
  <field>
    <name>description</name>
    <type>text</type>
    <html>
      <type>TextArea</type>
      <rows>2</rows>
      <cols>60</cols>
      <label>Description</label>
    </html>
    <default>NULL</default>
    <localizable>true</localizable>
    <comment>Price field option description.</comment>
    <add>3.3</add>
  </field>
  <field>
    <name>help_pre</name>
    <type>text</type>
    <html>
      <type>TextArea</type>
      <rows>2</rows>
      <cols>60</cols>
      <label>Pre Help</label>
    </html>
    <default>NULL</default>
    <localizable>true</localizable>
    <comment>Price field option pre help text.</comment>
    <add>4.7</add>
  </field>
  <field>
    <name>help_post</name>
    <type>text</type>
    <html>
      <type>TextArea</type>
      <rows>2</rows>
      <cols>60</cols>
      <label>Post Help</label>
    </html>
    <default>NULL</default>
    <localizable>true</localizable>
    <comment>Price field option post field help.</comment>
    <add>4.7</add>
  </field>
  <field>
    <name>amount</name>
    <type>decimal</type>
    <title>Amount</title>
    <length>18,9</length>
    <html>
      <type>Text</type>
      <size>8</size>
    </html>
    <required>true</required>
    <comment>Price field option amount</comment>
    <add>3.3</add>
  </field>
  <field>
    <name>count</name>
    <type>int unsigned</type>
    <default>NULL</default>
    <comment>Number of participants per field option</comment>
    <add>3.3</add>
    <html>
      <type>Text</type>
      <label>Count</label>
    </html>
  </field>
  <field>
    <name>max_value</name>
    <type>int unsigned</type>
    <default>NULL</default>
    <comment>Max number of participants per field options</comment>
    <add>3.3</add>
    <html>
      <type>Text</type>
      <label>Max Value</label>
    </html>
  </field>
  <field>
    <name>weight</name>
    <title>Order</title>
    <type>int</type>
    <default>1</default>
    <comment>Order in which the field options should appear</comment>
    <add>3.3</add>
    <html>
      <type>Text</type>
    </html>
  </field>
  <field>
    <name>membership_type_id</name>
    <title>Membership Type ID</title>
    <type>int unsigned</type>
    <default>NULL</default>
    <comment>FK to Membership Type</comment>
    <html>
      <type>EntityRef</type>
      <label>Membership Type</label>
    </html>
    <add>3.4</add>
  </field>
  <foreignKey>
    <name>membership_type_id</name>
    <table>civicrm_membership_type</table>
    <key>id</key>
    <add>3.4</add>
    <onDelete>SET NULL</onDelete>
  </foreignKey>
  <field>
    <name>membership_num_terms</name>
    <type>int unsigned</type>
    <default>NULL</default>
    <comment>Number of terms for this membership</comment>
    <add>4.3</add>
    <html>
      <type>Text</type>
      <label>Number of terms</label>
    </html>
  </field>
  <field>
    <name>is_default</name>
    <title>Is Default Price Field Option?</title>
    <type>boolean</type>
    <comment>Is this default price field option</comment>
    <default>0</default>
    <required>true</required>
    <html>
      <type>CheckBox</type>
      <label>Default</label>
    </html>
    <add>3.3</add>
  </field>
  <field>
    <name>is_active</name>
    <title>Price Field Value is Active</title>
    <type>boolean</type>
    <comment>Is this price field value active</comment>
    <default>1</default>
    <required>true</required>
    <html>
      <type>CheckBox</type>
      <label>Enabled</label>
    </html>
    <add>3.3</add>
  </field>
  <field>
    <name>financial_type_id</name>
    <title>Financial Type ID</title>
    <type>int unsigned</type>
    <default>NULL</default>
    <pseudoconstant>
      <table>civicrm_financial_type</table>
      <keyColumn>id</keyColumn>
      <labelColumn>name</labelColumn>
    </pseudoconstant>
    <comment>FK to Financial Type.</comment>
    <add>4.3</add>
    <html>
      <type>Select</type>
      <label>Financial Type</label>
    </html>
  </field>
  <foreignKey>
    <name>financial_type_id</name>
    <table>civicrm_financial_type</table>
    <key>id</key>
    <onDelete>SET NULL</onDelete>
    <add>4.3</add>
  </foreignKey>
  <field>
    <name>non_deductible_amount</name>
    <title>Non-deductible Amount</title>
    <type>decimal</type>
    <default>0.0</default>
    <headerPattern>/non?.?deduct/i</headerPattern>
    <dataPattern>/^\d+(\.\d{2})?$/</dataPattern>
    <required>true</required>
    <comment>Portion of total amount which is NOT tax deductible.</comment>
    <add>4.7</add>
    <html>
      <type>Text</type>
    </html>
  </field>
  <field>
    <name>visibility_id</name>
    <title>Price Field Option Visibility</title>
    <type>int unsigned</type>
    <default>1</default>
    <comment>Implicit FK to civicrm_option_group with name = 'visibility'</comment>
    <add>4.7</add>
    <pseudoconstant>
      <optionGroupName>visibility</optionGroupName>
    </pseudoconstant>
    <html>
      <type>Select</type>
    </html>
  </field>
</table>
