<?php
class CustomerContactTable extends Table
{
    const C_TABLE                       = "CUSTOMER_CONTACT";
    const C_PK                          = "CUSTOMER_CONTACT_ID";
    const C_ID                          = "CUSTOMER_ID";
    const C_CONTACT_ID                  = "CUSTOMER_CONTACT_ID";
    const C_NAME                        = "CUSTOMER_CONTACT_NAME";
    const C_PREFER_NAME                 = "CUSTOMER_CONTACT_PREFERRED_NAME";
    const C_EMAIL                       = "CUSTOMER_CONTACT_EMAIL";
    const C_TELEPHONE                   = "CUSTOMER_CONTACT_TELEPHONE";
    const C_MOBILE                      = "CUSTOMER_CONTACT_MOBILE";
    const C_DESIGNATION                 = "CUSTOMER_CONTACT_DESIGNATION";
    const C_SALUTATION                  = "CUSTOMER_CONTACT_SALUTATION";
    const C_REPORT_TO                   = "CUSTOMER_CONTACT_REPORT_TO";
    const C_DEPT                        = "CUSTOMER_CONTACT_DEPARTMENT";
    const C_COMM_PREF                   = "CUSTOMER_CONTACT_COMMUNICATION_PREF";
    const C_JOB_DESC                    = "CUSTOMER_CONTACT_JOB_DESCRIPTION";
    const C_HOBBIES                     = "CUSTOMER_CONTACT_HOBBIES";
    const C_CHARACTER                   = "CUSTOMER_CONTACT_CHARACTER";
    const C_DEPT_GROUP                  = "CUSTOMER_CONTACT_DEPT_GROUP";
    const C_PRIORITY                    = "CUSTOMER_CONTACT_PRIORITY";
    const C_ESUPPORT_FINANCE            = "CUSTOMER_CONTACT_ESUPPORT_FINANCE";
    const C_ESUPPORT_IT                 = "CUSTOMER_CONTACT_ESUPPORT_IT";
    const C_ESUPPORT_PROJECT            = "CUSTOMER_CONTACT_ESUPPORT_PROJECT";
    const C_ESUPPORT_MANAGEMENT         = "CUSTOMER_CONTACT_ESUPPORT_MANAGEMENT";
    const C_STATUS                      = "CUSTOMER_CONTACT_STATUS";
    const C_REF_ID                      = "CUSTOMER_CONTACT_REFERENCE_ID";//mooncake reference id
    const C_STATUS_SEND_EMAIL           = "CUSTOMER_CONTACT_STATUS_SEND_EMAIL";//mooncake reference id
    const C_STATUS_SEND_WA              = "CUSTOMER_CONTACT_STATUS_SEND_WA";//mooncake reference id
	
    const C_UNSUBSCRIBE_TOKEN		 	= "CUSTOMER_CONTACT_UNSUBSCRIBE_TOKEN";
    const C_UNSUBSCRIBE_DATE		 	= "PERSON_CONTACT_UNSUBSCRIBE_DATE";
}

class CustomerContactTableDetail extends TableDetail
{
    const C_CONTACT_ID                  = "identity||NO|";
    const C_ID                          = "int||NO|(0)";
    const C_NAME                        = "nvarchar|255|NO|''";
    const C_PREFER_NAME                 = "nvarchar|100|NO|''";
    const C_EMAIL                       = "nvarchar|125|NO|''";
    const C_TELEPHONE                   = "nvarchar|255|NO|''";
    const C_MOBILE                      = "nvarchar|255|NO|''";
    const C_DESIGNATION                 = "nvarchar|255|NO|''";
    const C_SALUTATION                  = "int||NO|(0)";
    const C_REPORT_TO                   = "nvarchar|255|NO|''";
    const C_DEPT                        = "nvarchar|255|NO|''";
    const C_DEPT_GROUP                  = "int||NO|(0)";
    const C_PRIORITY                    = "int||NO|(0)";
    const C_COMM_PREF                   = "nvarchar|255|NO|''";
    const C_JOB_DESC                    = "nvarchar|4000|NO|''";
    const C_HOBBIES                     = "nvarchar|4000|NO|''";
    const C_CHARACTER                   = "nvarchar|4000|NO|''";
    const C_POSITION                    = "int||NO|(0)";
    const C_ESUPPORT_FINANCE            = "int||NO|(0)";
    const C_ESUPPORT_IT                 = "int||NO|(0)";
    const C_ESUPPORT_PROJECT            = "int||NO|(0)";
    const C_ESUPPORT_MANAGEMENT         = "int||NO|(0)";
    const C_STATUS                      = "int||NO|(0)";
    const C_REF_ID                      = "nvarchar|255|NO|''";
    const C_STATUS_SEND_EMAIL           = "int||NO|(0)";
    const C_STATUS_SEND_WA              = "int||NO|(0)";
    
    const C_UNSUBSCRIBE_TOKEN		 	= "nvarchar|50|NO|''";
    const C_UNSUBSCRIBE_DATE		 	= "datetime||YES|NULL";
}

class CustomerContactTableDescription extends TableDescription
{
    const C_CONTACT_ID                  = "Contact ID";
    const C_ID                          = "ID";
    const C_NAME                        = "Name";
    const C_PREFER_NAME                 = "Preferred Name";
    const C_EMAIL                       = "Email";
    const C_TELEPHONE                   = "Telephone";
    const C_MOBILE                      = "Mobile";
    const C_DESIGNATION                 = "Designation";
    const C_SALUTATION                  = "Salutation";
    const C_REPORT_TO                   = "Report To";
    const C_DEPT                        = "Dept";
    const C_DEPT_GROUP                  = "Deptment Group";
    const C_PRIORITY                    = "Priority";
    const C_COMM_PREF                   = "Communication Preference";
    const C_JOB_DESC                    = "Job Description";
    const C_HOBBIES                     = "Hobbies";
    const C_CHARACTER                   = "Character";
    const C_POSITION                    = "Position";
    const C_STATUS                      = "Status";
    const C_REF_ID                      = "Reference ID";
    const C_STATUS_SEND_EMAIL           = "Send Email Status";
    const C_STATUS_SEND_WA              = "Send WhatsApp Status";

    const C_UNSUBSCRIBE_TOKEN           = "Unsubscribe Token";
    const C_UNSUBSCRIBE_DATE            = "Unsubscribe Date";
}
