<?php
class PersonContactTable extends Table
{

	const C_TABLE                       = "PERSON_CONTACT";
	const C_ID                  		= "PERSON_CONTACT_ID";
	const C_PK                 			= "PERSON_CONTACT_ID";
	const C_FULL_NAME                   = "PERSON_CONTACT_FULL_NAME";
	const C_PREFER_NAME                 = "PERSON_CONTACT_PREFER_NAME";
	const C_TELEPHONE                   = "PERSON_CONTACT_PHONE";
	const C_EMAIL     		            = "PERSON_CONTACT_EMAIL";
	const C_DEPT 			            = "PERSON_CONTACT_DEPARTMENT";
	const C_COMMENT 		            = "PERSON_CONTACT_COMMENT";
	const C_PREFER_PROMOTION            = "PERSON_CONTACT_PREFER_PROMOTION";
	const C_PREFER_WHATSAPP             = "PERSON_CONTACT_PREFER_WHATSAPP";
	const C_PREFER_TELEGRAM             = "PERSON_CONTACT_PREFER_TELEGRAM";
	const C_PREFER_EMAIL              	= "PERSON_CONTACT_PREFER_EMAIL";
	const C_PREFER_TELEPHONE            = "PERSON_CONTACT_PREFER_TELEPHONE";

	const C_MOONCAKE					= "PERSON_CONTACT_MOONCAKE";
	const C_XMAS_CARD					= "PERSON_CONTACT_XMAS_CARD";
	const C_CNY							= "PERSON_CONTACT_CNY";

	const C_UNSUBSCRIBE_TOKEN		 	= "PERSON_CONTACT_UNSUBSCRIBE_TOKEN";
	const C_UNSUBSCRIBE_DATE		 	= "PERSON_CONTACT_UNSUBSCRIBE_DATE";
	
}

class PersonContactTableDetail extends TableDetail
{
	const C_ID 			                = "identity||NO|";
	const C_FULL_NAME                   = "nvarchar|255|NO|''";
	const C_PREFER_NAME                 = "nvarchar|255|NO|''";
	const C_TELEPHONE                   = "nvarchar|255|NO|''";
	const C_EMAIL     		            = "nvarchar|255|NO|''";
	const C_DEPT     		            = "nvarchar|255|NO|''";
	const C_COMMENT     		        = "ntext||NO|''";
	const C_PREFER_PROMOTION            = "int||NO|(0)";
	const C_PREFER_WHATSAPP             = "int||NO|(0)";
	const C_PREFER_TELEGRAM             = "int||NO|(0)";
	const C_PREFER_EMAIL              	= "int||NO|(0)";
	const C_PREFER_TELEPHONE            = "int||NO|(0)";

	const C_MOONCAKE            		= "nvarchar|255|NO|''";
	const C_XMAS_CARD            		= "nvarchar|255|NO|''";
	const C_CNY		            		= "nvarchar|255|NO|''";

	const C_UNSUBSCRIBE_TOKEN		 	= "nvarchar|50|NO|''";
	const C_UNSUBSCRIBE_DATE		 	= "datetime||YES|NULL";
}