mirror of
https://codeberg.org/artfulrobot/contactcats.git
synced 2025-06-25 10:18:05 +02:00
initial commit
This commit is contained in:
commit
3b393be4f4
16 changed files with 1594 additions and 0 deletions
10
xml/schema/CRM/Contactcats/ContactCategory.entityType.php
Normal file
10
xml/schema/CRM/Contactcats/ContactCategory.entityType.php
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
// This file declares a new entity type. For more details, see "hook_civicrm_entityTypes" at:
|
||||
// https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_entityTypes
|
||||
return [
|
||||
[
|
||||
'name' => 'ContactCategory',
|
||||
'class' => 'CRM_Contactcats_DAO_ContactCategory',
|
||||
'table' => 'civicrm_contact_category',
|
||||
],
|
||||
];
|
53
xml/schema/CRM/Contactcats/ContactCategory.xml
Normal file
53
xml/schema/CRM/Contactcats/ContactCategory.xml
Normal file
|
@ -0,0 +1,53 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1" ?>
|
||||
|
||||
<table>
|
||||
<base>CRM/Contactcats</base>
|
||||
<class>ContactCategory</class>
|
||||
<name>civicrm_contact_category</name>
|
||||
<comment>Stores a category for each contact</comment>
|
||||
<log>false</log>
|
||||
|
||||
<field>
|
||||
<name>id</name>
|
||||
<type>int unsigned</type>
|
||||
<required>true</required>
|
||||
<comment>Unique ID, corresponds to contact id</comment>
|
||||
<html>
|
||||
<type>Number</type>
|
||||
</html>
|
||||
</field>
|
||||
<primaryKey>
|
||||
<name>id</name>
|
||||
<autoincrement>true</autoincrement>
|
||||
</primaryKey>
|
||||
<foreignKey>
|
||||
<name>contact_id</name>
|
||||
<table>civicrm_contact</table>
|
||||
<key>id</key>
|
||||
<onDelete>CASCADE</onDelete>
|
||||
</foreignKey>
|
||||
|
||||
<field>
|
||||
<name>category</name>
|
||||
<type>int unsigned</type>
|
||||
<required>true</required>
|
||||
<default>0</default>
|
||||
<pseudoconstant>
|
||||
<optionGroupName>ContactCategories</optionGroupName>
|
||||
</pseudoconstant>
|
||||
<html>
|
||||
<type>Select</type>
|
||||
</html>
|
||||
</field>
|
||||
|
||||
<field>
|
||||
<name>next_category</name>
|
||||
<type>int unsigned</type>
|
||||
<required>true</required>
|
||||
<default>0</default>
|
||||
<pseudoconstant>
|
||||
<optionGroupName>ContactCategories</optionGroupName>
|
||||
</pseudoconstant>
|
||||
</field>
|
||||
|
||||
</table>
|
Loading…
Add table
Add a link
Reference in a new issue