Move pingback code to separate repo
[civicrm-core.git] / tools / xml / schema / Auction / Bid.xml
CommitLineData
6a488035
TO
1<?xml version="1.0" encoding="iso-8859-1" ?>
2
3<table>
4 <base>CRM/Auction</base>
5 <class>Bid</class>
6 <name>civicrm_auction_bid</name>
7 <comment>auction item bids.</comment>
8 <add>3.0</add>
9 <field>
10 <name>id</name>
11 <type>int unsigned</type>
12 <required>true</required>
13 <comment>primary key</comment>
14 <add>3.0</add>
15 </field>
16 <primaryKey>
17 <name>id</name>
18 <autoincrement>true</autoincrement>
19 </primaryKey>
20 <field>
21 <name>contact_id</name>
22 <type>int unsigned</type>
23 <required>true</required>
24 <comment>FK to civicrm_contact, who bid on this item</comment>
25 <add>3.0</add>
26 </field>
27 <foreignKey>
28 <name>contact_id</name>
29 <table>civicrm_contact</table>
30 <key>id</key>
31 <add>3.0</add>
32 <onDelete>CASCADE</onDelete>
33 </foreignKey>
34 <field>
35 <name>auction_item_id</name>
36 <type>int unsigned</type>
37 <required>true</required>
38 <comment>FK to civicrm_auction_item</comment>
39 <add>3.0</add>
40 </field>
41 <foreignKey>
42 <name>auction_item_id</name>
43 <table>civicrm_auction_item</table>
44 <key>id</key>
45 <add>3.0</add>
46 <onDelete>CASCADE</onDelete>
47 </foreignKey>
bcd9e9f5
EM
48 <field>
49 <name>bid_value</name>
6a488035 50 <title>Price</title>
bcd9e9f5
EM
51 <type>decimal</type>
52 <comment>Amount bid per item.</comment>
53 <add>3.0</add>
6a488035 54 </field>
bcd9e9f5
EM
55 <field>
56 <name>quantity</name>
57 <type>int unsigned</type>
58 <comment>Number of items bid on.</comment>
59 <add>3.0</add>
6a488035
TO
60 </field>
61 <field>
62 <name>bid_date</name>
63 <type>datetime</type>
64 <comment>Date and time the bid was made.</comment>
65 <add>3.0</add>
66 </field>
bcd9e9f5
EM
67 <field>
68 <name>is_active</name>
6a488035 69 <type>boolean</type>
bcd9e9f5
EM
70 <default>0</default>
71 <comment>Is this bid active or disabled/cancelled?</comment>
72 <add>3.0</add>
73 </field>
74 <field>
75 <name>is_winner</name>
6a488035 76 <type>boolean</type>
bcd9e9f5
EM
77 <default>0</default>
78 <comment>Is this bid the winning bid</comment>
79 <add>3.0</add>
80 </field>
81 <field>
82 <name>quantity_won</name>
83 <type>int unsigned</type>
84 <comment>Number of items this bid won.</comment>
85 <add>3.0</add>
6a488035 86 </field>
bcd9e9f5
EM
87 <field>
88 <name>contribution_id</name>
89 <type>int unsigned</type>
90 <comment>FK to contribution table.</comment>
91 <add>3.0</add>
6a488035 92 </field>
bcd9e9f5
EM
93 <foreignKey>
94 <name>contribution_id</name>
95 <table>civicrm_contribution</table>
96 <key>id</key>
97 <add>3.0</add>
6a488035
TO
98 <onDelete>SET NULL</onDelete>
99 </foreignKey>
100</table>