Merge pull request #18365 from eileenmcnaughton/member
[civicrm-core.git] / xml / schema / Core / Note.xml
CommitLineData
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>
17 <add>1.1</add>
6a488035
TO
18 </field>
19 <primaryKey>
bf76be71
EM
20 <name>id</name>
21 <autoincrement>true</autoincrement>
6a488035
TO
22 </primaryKey>
23 <field>
bf76be71
EM
24 <name>entity_table</name>
25 <title>Note Entity</title>
26 <type>varchar</type>
27 <length>64</length>
28 <required>true</required>
29 <comment>Name of table where item being referenced is stored.</comment>
583bd2a5
SL
30 <pseudoconstant>
31 <callback>CRM_Core_BAO_Note::entityTables</callback>
32 </pseudoconstant>
bf76be71 33 <add>1.1</add>
6a488035
TO
34 </field>
35 <field>
bf76be71
EM
36 <name>entity_id</name>
37 <title>Note Entity ID</title>
38 <type>int unsigned</type>
39 <required>true</required>
40 <comment>Foreign key to the referenced item.</comment>
41 <add>1.1</add>
6a488035 42 </field>
71e5aa5c 43 <dynamicForeignKey>
bf76be71
EM
44 <idColumn>entity_id</idColumn>
45 <typeColumn>entity_table</typeColumn>
46 <add>1.1</add>
71e5aa5c 47 </dynamicForeignKey>
6a488035 48 <index>
bf76be71
EM
49 <name>index_entity</name>
50 <fieldName>entity_table</fieldName>
51 <fieldName>entity_id</fieldName>
52 <add>1.1</add>
6a488035
TO
53 </index>
54 <field>
bf76be71
EM
55 <name>note</name>
56 <title>Note</title>
57 <type>text</type>
58 <comment>Note and/or Comment.</comment>
59 <html>
60 <type>TextArea</type>
61 <rows>4</rows>
62 <cols>60</cols>
63 </html>
64 <import>true</import>
65 <headerPattern>/Note|Comment/i</headerPattern>
66 <dataPattern>//</dataPattern>
67 <add>1.1</add>
6a488035
TO
68 </field>
69 <field>
bf76be71
EM
70 <name>contact_id</name>
71 <title>Note Created By</title>
72 <type>int unsigned</type>
73 <comment>FK to Contact ID creator</comment>
74 <add>1.1</add>
6a488035
TO
75 </field>
76 <foreignKey>
bf76be71
EM
77 <name>contact_id</name>
78 <table>civicrm_contact</table>
79 <key>id</key>
80 <add>1.1</add>
81 <onDelete>SET NULL</onDelete>
6a488035
TO
82 </foreignKey>
83 <field>
bf76be71
EM
84 <name>modified_date</name>
85 <title>Note Modified By</title>
95ae25b9 86 <type>timestamp</type>
bf76be71 87 <comment>When was this note last modified/edited</comment>
95ae25b9 88 <default>CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP</default>
bf76be71 89 <add>1.1</add>
6a488035
TO
90 </field>
91 <field>
bf76be71
EM
92 <name>subject</name>
93 <title>Subject</title>
94 <type>varchar</type>
95 <length>255</length>
96 <comment>subject of note description</comment>
b1d46a6b
TM
97 <html>
98 <type>Text</type>
5b8080ad 99 <size>60</size>
b1d46a6b 100 </html>
bf76be71 101 <add>1.5</add>
6a488035
TO
102 </field>
103 <field>
bf76be71
EM
104 <name>privacy</name>
105 <title>Privacy</title>
106 <type>varchar</type>
107 <length>255</length>
108 <comment>Foreign Key to Note Privacy Level (which is an option value pair and hence an implicit FK)</comment>
109 <add>3.3</add>
afbbfe95
PN
110 <html>
111 <type>Select</type>
112 </html>
d962cd76 113 <pseudoconstant>
114 <optionGroupName>note_privacy</optionGroupName>
115 </pseudoconstant>
6a488035
TO
116 </field>
117</table>