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> | |
449c4e6b | 10 | <icon>fa-sticky-note</icon> |
6a488035 | 11 | <field> |
bf76be71 EM |
12 | <name>id</name> |
13 | <title>Note ID</title> | |
14 | <type>int unsigned</type> | |
15 | <required>true</required> | |
16 | <comment>Note ID</comment> | |
0481e12c A |
17 | <html> |
18 | <type>Number</type> | |
19 | </html> | |
bf76be71 | 20 | <add>1.1</add> |
6a488035 TO |
21 | </field> |
22 | <primaryKey> | |
bf76be71 EM |
23 | <name>id</name> |
24 | <autoincrement>true</autoincrement> | |
6a488035 TO |
25 | </primaryKey> |
26 | <field> | |
bf76be71 EM |
27 | <name>entity_table</name> |
28 | <title>Note Entity</title> | |
29 | <type>varchar</type> | |
30 | <length>64</length> | |
31 | <required>true</required> | |
32 | <comment>Name of table where item being referenced is stored.</comment> | |
583bd2a5 | 33 | <pseudoconstant> |
8ced16c7 | 34 | <optionGroupName>note_used_for</optionGroupName> |
583bd2a5 | 35 | </pseudoconstant> |
bf76be71 | 36 | <add>1.1</add> |
6a488035 TO |
37 | </field> |
38 | <field> | |
bf76be71 EM |
39 | <name>entity_id</name> |
40 | <title>Note Entity ID</title> | |
41 | <type>int unsigned</type> | |
42 | <required>true</required> | |
43 | <comment>Foreign key to the referenced item.</comment> | |
44 | <add>1.1</add> | |
6a488035 | 45 | </field> |
71e5aa5c | 46 | <dynamicForeignKey> |
bf76be71 EM |
47 | <idColumn>entity_id</idColumn> |
48 | <typeColumn>entity_table</typeColumn> | |
49 | <add>1.1</add> | |
71e5aa5c | 50 | </dynamicForeignKey> |
6a488035 | 51 | <index> |
bf76be71 EM |
52 | <name>index_entity</name> |
53 | <fieldName>entity_table</fieldName> | |
54 | <fieldName>entity_id</fieldName> | |
55 | <add>1.1</add> | |
6a488035 TO |
56 | </index> |
57 | <field> | |
bf76be71 EM |
58 | <name>note</name> |
59 | <title>Note</title> | |
60 | <type>text</type> | |
61 | <comment>Note and/or Comment.</comment> | |
62 | <html> | |
63 | <type>TextArea</type> | |
64 | <rows>4</rows> | |
65 | <cols>60</cols> | |
66 | </html> | |
67 | <import>true</import> | |
68 | <headerPattern>/Note|Comment/i</headerPattern> | |
69 | <dataPattern>//</dataPattern> | |
70 | <add>1.1</add> | |
6a488035 TO |
71 | </field> |
72 | <field> | |
bf76be71 | 73 | <name>contact_id</name> |
047c5009 | 74 | <title>Created By Contact ID</title> |
bf76be71 EM |
75 | <type>int unsigned</type> |
76 | <comment>FK to Contact ID creator</comment> | |
57e94608 | 77 | <html> |
047c5009 | 78 | <label>Created By</label> |
57e94608 | 79 | </html> |
bf76be71 | 80 | <add>1.1</add> |
6a488035 TO |
81 | </field> |
82 | <foreignKey> | |
bf76be71 EM |
83 | <name>contact_id</name> |
84 | <table>civicrm_contact</table> | |
85 | <key>id</key> | |
86 | <add>1.1</add> | |
87 | <onDelete>SET NULL</onDelete> | |
6a488035 | 88 | </foreignKey> |
5bfc73d6 JP |
89 | <field> |
90 | <name>note_date</name> | |
91 | <title>Note Date</title> | |
92 | <type>timestamp</type> | |
93 | <add>5.36</add> | |
94 | <default>CURRENT_TIMESTAMP</default> | |
95 | <comment>Date attached to the note</comment> | |
96 | <html> | |
97 | <type>Select Date</type> | |
98 | <formatType>activityDateTime</formatType> | |
99 | </html> | |
100 | </field> | |
101 | <field> | |
102 | <name>created_date</name> | |
103 | <type>timestamp</type> | |
104 | <comment>When the note was created.</comment> | |
105 | <required>true</required> | |
106 | <default>CURRENT_TIMESTAMP</default> | |
107 | <add>5.36</add> | |
108 | </field> | |
6a488035 | 109 | <field> |
bf76be71 EM |
110 | <name>modified_date</name> |
111 | <title>Note Modified By</title> | |
95ae25b9 | 112 | <type>timestamp</type> |
bf76be71 | 113 | <comment>When was this note last modified/edited</comment> |
95ae25b9 | 114 | <default>CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP</default> |
bf76be71 | 115 | <add>1.1</add> |
a0e733f3 | 116 | <readonly>true</readonly> |
6a488035 TO |
117 | </field> |
118 | <field> | |
bf76be71 EM |
119 | <name>subject</name> |
120 | <title>Subject</title> | |
121 | <type>varchar</type> | |
122 | <length>255</length> | |
123 | <comment>subject of note description</comment> | |
b1d46a6b TM |
124 | <html> |
125 | <type>Text</type> | |
5b8080ad | 126 | <size>60</size> |
b1d46a6b | 127 | </html> |
bf76be71 | 128 | <add>1.5</add> |
6a488035 TO |
129 | </field> |
130 | <field> | |
bf76be71 EM |
131 | <name>privacy</name> |
132 | <title>Privacy</title> | |
133 | <type>varchar</type> | |
134 | <length>255</length> | |
135 | <comment>Foreign Key to Note Privacy Level (which is an option value pair and hence an implicit FK)</comment> | |
136 | <add>3.3</add> | |
afbbfe95 PN |
137 | <html> |
138 | <type>Select</type> | |
139 | </html> | |
d962cd76 | 140 | <pseudoconstant> |
141 | <optionGroupName>note_privacy</optionGroupName> | |
142 | </pseudoconstant> | |
6a488035 TO |
143 | </field> |
144 | </table> |