Merge pull request #14894 from eileenmcnaughton/date_fisc
[civicrm-core.git] / xml / schema / Core / Note.xml
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>
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>
17 </field>
18 <primaryKey>
19 <name>id</name>
20 <autoincrement>true</autoincrement>
21 </primaryKey>
22 <field>
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>
29 <pseudoconstant>
30 <callback>CRM_Core_BAO_Note::entityTables</callback>
31 </pseudoconstant>
32 <add>1.1</add>
33 </field>
34 <field>
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>
41 </field>
42 <dynamicForeignKey>
43 <idColumn>entity_id</idColumn>
44 <typeColumn>entity_table</typeColumn>
45 <add>1.1</add>
46 </dynamicForeignKey>
47 <index>
48 <name>index_entity</name>
49 <fieldName>entity_table</fieldName>
50 <fieldName>entity_id</fieldName>
51 <add>1.1</add>
52 </index>
53 <field>
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>
67 </field>
68 <field>
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>
74 </field>
75 <foreignKey>
76 <name>contact_id</name>
77 <table>civicrm_contact</table>
78 <key>id</key>
79 <add>1.1</add>
80 <onDelete>SET NULL</onDelete>
81 </foreignKey>
82 <field>
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>
88 </field>
89 <field>
90 <name>subject</name>
91 <title>Subject</title>
92 <type>varchar</type>
93 <length>255</length>
94 <comment>subject of note description</comment>
95 <html>
96 <type>Text</type>
97 <size>60</size>
98 </html>
99 <add>1.5</add>
100 </field>
101 <field>
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>
108 <html>
109 <type>Select</type>
110 </html>
111 <pseudoconstant>
112 <optionGroupName>note_privacy</optionGroupName>
113 </pseudoconstant>
114 </field>
115 </table>