Merge pull request #18158 from mattwire/createProfileContact
[civicrm-core.git] / xml / schema / ACL / ACLEntityRole.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2
3 <table>
4 <base>CRM/ACL</base>
5 <class>ACLEntityRole</class>
6 <name>civicrm_acl_entity_role</name>
7 <comment>Join table for Contacts and Groups to ACL Roles</comment>
8 <add>1.6</add>
9 <field>
10 <name>id</name>
11 <type>int unsigned</type>
12 <title>Entity Role</title>
13 <required>true</required>
14 <comment>Unique table ID</comment>
15 <html>
16 <type>Number</type>
17 </html>
18 <add>1.6</add>
19 </field>
20 <primaryKey>
21 <name>id</name>
22 <autoincrement>true</autoincrement>
23 </primaryKey>
24 <field>
25 <name>acl_role_id</name>
26 <title>ACL Role ID</title>
27 <type>int unsigned</type>
28 <required>true</required>
29 <pseudoconstant>
30 <optionGroupName>acl_role</optionGroupName>
31 </pseudoconstant>
32 <comment>Foreign Key to ACL Role (which is an option value pair and hence an implicit FK)</comment>
33 <add>1.6</add>
34 </field>
35 <field>
36 <name>entity_table</name>
37 <title>Entity Table</title>
38 <type>varchar</type>
39 <length>64</length>
40 <required>true</required>
41 <pseudoconstant>
42 <callback>CRM_ACL_BAO_ACLEntityRole::entityTables</callback>
43 </pseudoconstant>
44 <comment>Table of the object joined to the ACL Role (Contact or Group)</comment>
45 <add>1.6</add>
46 </field>
47 <field>
48 <name>entity_id</name>
49 <title>ACL Entity ID</title>
50 <type>int unsigned</type>
51 <required>true</required>
52 <comment>ID of the group/contact object being joined</comment>
53 <add>1.6</add>
54 </field>
55 <dynamicForeignKey>
56 <idColumn>entity_id</idColumn>
57 <typeColumn>entity_table</typeColumn>
58 <add>1.6</add>
59 </dynamicForeignKey>
60 <field>
61 <name>is_active</name>
62 <title>ACL Entity Role is Active</title>
63 <type>boolean</type>
64 <comment>Is this property active?</comment>
65 <add>1.6</add>
66 </field>
67 <index>
68 <name>index_role</name>
69 <fieldName>acl_role_id</fieldName>
70 <add>1.6</add>
71 </index>
72 <index>
73 <name>index_entity</name>
74 <fieldName>entity_table</fieldName>
75 <fieldName>entity_id</fieldName>
76 <add>1.6</add>
77 </index>
78 </table>