Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | <?xml version="1.0" encoding="iso-8859-1" ?> |
2 | ||
3 | <table> | |
4 | <base>CRM/Core</base> | |
5 | <class>Note</class> | |
6 | <name>civicrm_note</name> | |
7 | <comment>Notes can be linked to any object in the application.</comment> | |
8 | <add>1.1</add> | |
9 | <log>true</log> | |
10 | <field> | |
bf76be71 EM |
11 | <name>id</name> |
12 | <title>Note ID</title> | |
13 | <type>int unsigned</type> | |
14 | <required>true</required> | |
15 | <comment>Note ID</comment> | |
16 | <add>1.1</add> | |
6a488035 TO |
17 | </field> |
18 | <primaryKey> | |
bf76be71 EM |
19 | <name>id</name> |
20 | <autoincrement>true</autoincrement> | |
6a488035 TO |
21 | </primaryKey> |
22 | <field> | |
bf76be71 EM |
23 | <name>entity_table</name> |
24 | <title>Note Entity</title> | |
25 | <type>varchar</type> | |
26 | <length>64</length> | |
27 | <required>true</required> | |
28 | <comment>Name of table where item being referenced is stored.</comment> | |
583bd2a5 SL |
29 | <pseudoconstant> |
30 | <callback>CRM_Core_BAO_Note::entityTables</callback> | |
31 | </pseudoconstant> | |
bf76be71 | 32 | <add>1.1</add> |
6a488035 TO |
33 | </field> |
34 | <field> | |
bf76be71 EM |
35 | <name>entity_id</name> |
36 | <title>Note Entity ID</title> | |
37 | <type>int unsigned</type> | |
38 | <required>true</required> | |
39 | <comment>Foreign key to the referenced item.</comment> | |
40 | <add>1.1</add> | |
6a488035 | 41 | </field> |
71e5aa5c | 42 | <dynamicForeignKey> |
bf76be71 EM |
43 | <idColumn>entity_id</idColumn> |
44 | <typeColumn>entity_table</typeColumn> | |
45 | <add>1.1</add> | |
71e5aa5c | 46 | </dynamicForeignKey> |
6a488035 | 47 | <index> |
bf76be71 EM |
48 | <name>index_entity</name> |
49 | <fieldName>entity_table</fieldName> | |
50 | <fieldName>entity_id</fieldName> | |
51 | <add>1.1</add> | |
6a488035 TO |
52 | </index> |
53 | <field> | |
bf76be71 EM |
54 | <name>note</name> |
55 | <title>Note</title> | |
56 | <type>text</type> | |
57 | <comment>Note and/or Comment.</comment> | |
58 | <html> | |
59 | <type>TextArea</type> | |
60 | <rows>4</rows> | |
61 | <cols>60</cols> | |
62 | </html> | |
63 | <import>true</import> | |
64 | <headerPattern>/Note|Comment/i</headerPattern> | |
65 | <dataPattern>//</dataPattern> | |
66 | <add>1.1</add> | |
6a488035 TO |
67 | </field> |
68 | <field> | |
bf76be71 EM |
69 | <name>contact_id</name> |
70 | <title>Note Created By</title> | |
71 | <type>int unsigned</type> | |
72 | <comment>FK to Contact ID creator</comment> | |
73 | <add>1.1</add> | |
6a488035 TO |
74 | </field> |
75 | <foreignKey> | |
bf76be71 EM |
76 | <name>contact_id</name> |
77 | <table>civicrm_contact</table> | |
78 | <key>id</key> | |
79 | <add>1.1</add> | |
80 | <onDelete>SET NULL</onDelete> | |
6a488035 TO |
81 | </foreignKey> |
82 | <field> | |
bf76be71 EM |
83 | <name>modified_date</name> |
84 | <title>Note Modified By</title> | |
85 | <type>date</type> | |
86 | <comment>When was this note last modified/edited</comment> | |
87 | <add>1.1</add> | |
6a488035 TO |
88 | </field> |
89 | <field> | |
bf76be71 EM |
90 | <name>subject</name> |
91 | <title>Subject</title> | |
92 | <type>varchar</type> | |
93 | <length>255</length> | |
94 | <comment>subject of note description</comment> | |
b1d46a6b TM |
95 | <html> |
96 | <type>Text</type> | |
5b8080ad | 97 | <size>60</size> |
b1d46a6b | 98 | </html> |
bf76be71 | 99 | <add>1.5</add> |
6a488035 TO |
100 | </field> |
101 | <field> | |
bf76be71 EM |
102 | <name>privacy</name> |
103 | <title>Privacy</title> | |
104 | <type>varchar</type> | |
105 | <length>255</length> | |
106 | <comment>Foreign Key to Note Privacy Level (which is an option value pair and hence an implicit FK)</comment> | |
107 | <add>3.3</add> | |
d962cd76 | 108 | <pseudoconstant> |
109 | <optionGroupName>note_privacy</optionGroupName> | |
110 | </pseudoconstant> | |
6a488035 TO |
111 | </field> |
112 | </table> |