model.itop-tickets.php 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. <?php
  2. //
  3. // File generated by ... on the 2012-06-05T18:30:57+0200
  4. // Please do not edit manually
  5. //
  6. //
  7. // Copyright (C) 2010 Combodo SARL
  8. //
  9. // ben on met quoi ici ?
  10. // Signé: Romain
  11. //
  12. // This program is free software; you can redistribute it and/or modify
  13. // it under the terms of the GNU General Public License as published by
  14. // the Free Software Foundation; version 3 of the License.
  15. //
  16. // This program is distributed in the hope that it will be useful,
  17. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. // GNU General Public License for more details.
  20. //
  21. // You should have received a copy of the GNU General Public License
  22. // along with this program; if not, write to the Free Software
  23. // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  24. /**
  25. * Classes and menus for itop-tickets (version 1.0.0)
  26. *
  27. * @author Combodo compiler
  28. * @license http://www.opensource.org/licenses/gpl-3.0.html LGPL
  29. */
  30. /**
  31. * Persistent classes for a CMDB
  32. *
  33. * @author Erwan Taloc <erwan.taloc@combodo.com>
  34. * @author Romain Quetiez <romain.quetiez@combodo.com>
  35. * @author Denis Flaven <denis.flaven@combodo.com>
  36. * @license http://www.opensource.org/licenses/gpl-3.0.html LGPL
  37. */
  38. class Ticket extends cmdbAbstractObject
  39. {
  40. public static function Init()
  41. {
  42. $aParams = array
  43. (
  44. 'category' => 'bizmodel,searchable,structure',
  45. 'key_type' => 'autoincrement',
  46. 'name_attcode' => 'ref',
  47. 'state_attcode' => '',
  48. 'reconc_keys' => array('ref'),
  49. 'db_table' => 'ticket',
  50. 'db_key_field' => 'id',
  51. 'db_finalclass_field' => '',
  52. );
  53. MetaModel::Init_Params($aParams);
  54. MetaModel::Init_InheritAttributes();
  55. MetaModel::Init_AddAttribute(new AttributeString("ref", array("allowed_values"=>null, "sql"=>'ref', "default_value"=>'', "is_null_allowed"=>false, "depends_on"=>array())));
  56. MetaModel::Init_AddAttribute(new AttributeExternalKey("organization_id", array("targetclass"=>'Organization', "allowed_values"=>null, "sql"=>'organization_id', "is_null_allowed"=>false, "on_target_delete"=>DEL_AUTO, "depends_on"=>array())));
  57. MetaModel::Init_AddAttribute(new AttributeExternalKey("caller_id", array("targetclass"=>'Person', "allowed_values"=>null, "sql"=>'caller_id', "is_null_allowed"=>false, "on_target_delete"=>DEL_AUTO, "depends_on"=>array())));
  58. MetaModel::Init_AddAttribute(new AttributeExternalKey("team_id", array("targetclass"=>'Team', "allowed_values"=>null, "sql"=>'team_id', "is_null_allowed"=>false, "on_target_delete"=>DEL_AUTO, "depends_on"=>array())));
  59. MetaModel::Init_AddAttribute(new AttributeExternalKey("agent_id", array("targetclass"=>'Person', "allowed_values"=>null, "sql"=>'agent_id', "is_null_allowed"=>false, "on_target_delete"=>DEL_AUTO, "depends_on"=>array())));
  60. MetaModel::Init_AddAttribute(new AttributeString("title", array("allowed_values"=>null, "sql"=>'title', "default_value"=>'', "is_null_allowed"=>true, "depends_on"=>array())));
  61. MetaModel::Init_AddAttribute(new AttributeText("description", array("allowed_values"=>null, "sql"=>'description', "default_value"=>'', "is_null_allowed"=>true, "depends_on"=>array())));
  62. MetaModel::Init_AddAttribute(new AttributeDateTime("start_date", array("allowed_values"=>null, "sql"=>'start_date', "default_value"=>'', "is_null_allowed"=>true, "depends_on"=>array())));
  63. MetaModel::Init_AddAttribute(new AttributeDateTime("end_date", array("allowed_values"=>null, "sql"=>'end_date', "default_value"=>'', "is_null_allowed"=>true, "depends_on"=>array())));
  64. MetaModel::Init_AddAttribute(new AttributeDateTime("last_update", array("allowed_values"=>null, "sql"=>'last_update', "default_value"=>'', "is_null_allowed"=>true, "depends_on"=>array())));
  65. MetaModel::Init_AddAttribute(new AttributeDateTime("close_date", array("allowed_values"=>null, "sql"=>'close_date', "default_value"=>'', "is_null_allowed"=>true, "depends_on"=>array())));
  66. MetaModel::Init_AddAttribute(new AttributeCaseLog("private_log", array("allowed_values"=>null, "sql"=>'private_log', "default_value"=>'', "is_null_allowed"=>false, "depends_on"=>array())));
  67. MetaModel::Init_AddAttribute(new AttributeLinkedSetIndirect("contacts_list", array("linked_class"=>'lnkContactToTicket', "ext_key_to_me"=>'ticket_id', "ext_key_to_remote"=>'contact_id', "allowed_values"=>null, "count_min"=>0, "count_max"=>0, "duplicates"=>false, "depends_on"=>array())));
  68. MetaModel::Init_AddAttribute(new AttributeLinkedSetIndirect("functionalcis_list", array("linked_class"=>'lnkFunctionalCIToTicket', "ext_key_to_me"=>'ticket_id', "ext_key_to_remote"=>'functionalci_id', "allowed_values"=>null, "count_min"=>0, "count_max"=>0, "duplicates"=>false, "depends_on"=>array())));
  69. MetaModel::Init_SetZListItems('details', array (
  70. 0 => 'ref',
  71. 1 => 'organization_id',
  72. 2 => 'caller_id',
  73. 3 => 'team_id',
  74. 4 => 'agent_id',
  75. 5 => 'title',
  76. 6 => 'description',
  77. 7 => 'start_date',
  78. 8 => 'end_date',
  79. 9 => 'last_update',
  80. 10 => 'close_date',
  81. 11 => 'private_log',
  82. 12 => 'contacts_list',
  83. 13 => 'functionalcis_list',
  84. ));
  85. MetaModel::Init_SetZListItems('standard_search', array (
  86. 0 => 'ref',
  87. 1 => 'title',
  88. 2 => 'description',
  89. 3 => 'start_date',
  90. 4 => 'end_date',
  91. 5 => 'last_update',
  92. 6 => 'close_date',
  93. ));
  94. MetaModel::Init_SetZListItems('list', array (
  95. 0 => 'ref',
  96. 1 => 'organization_id',
  97. 2 => 'title',
  98. 3 => 'caller_id',
  99. 4 => 'team_id',
  100. 5 => 'agent_id',
  101. 6 => 'start_date',
  102. ));
  103. }
  104. }
  105. class lnkContactToTicket extends cmdbAbstractObject
  106. {
  107. public static function Init()
  108. {
  109. $aParams = array
  110. (
  111. 'category' => 'bizModel',
  112. 'key_type' => 'autoincrement',
  113. 'name_attcode' => array('ticket_id', 'contact_id'),
  114. 'state_attcode' => '',
  115. 'reconc_keys' => array('ticket_id', 'contact_id'),
  116. 'db_table' => 'lnkcontacttoticket',
  117. 'db_key_field' => 'id',
  118. 'db_finalclass_field' => '',
  119. );
  120. MetaModel::Init_Params($aParams);
  121. MetaModel::Init_InheritAttributes();
  122. MetaModel::Init_AddAttribute(new AttributeExternalKey("ticket_id", array("targetclass"=>'Ticket', "allowed_values"=>null, "sql"=>'ticket_id', "is_null_allowed"=>false, "on_target_delete"=>DEL_AUTO, "depends_on"=>array())));
  123. MetaModel::Init_AddAttribute(new AttributeExternalKey("contact_id", array("targetclass"=>'Contact', "allowed_values"=>null, "sql"=>'contact_id', "is_null_allowed"=>false, "on_target_delete"=>DEL_AUTO, "depends_on"=>array())));
  124. MetaModel::Init_SetZListItems('details', array (
  125. 0 => 'ticket_id',
  126. 1 => 'contact_id',
  127. ));
  128. MetaModel::Init_SetZListItems('standard_search', array (
  129. 0 => 'ticket_id',
  130. 1 => 'contact_id',
  131. ));
  132. MetaModel::Init_SetZListItems('list', array (
  133. 0 => 'ticket_id',
  134. 1 => 'contact_id',
  135. ));
  136. }
  137. }
  138. class lnkFunctionalCIToTicket extends cmdbAbstractObject
  139. {
  140. public static function Init()
  141. {
  142. $aParams = array
  143. (
  144. 'category' => 'bizModel',
  145. 'key_type' => 'autoincrement',
  146. 'name_attcode' => array('ticket_id', 'functionalci_id'),
  147. 'state_attcode' => '',
  148. 'reconc_keys' => array('ticket_id', 'functionalci_id'),
  149. 'db_table' => 'lnkfunctionalcitoticket',
  150. 'db_key_field' => 'id',
  151. 'db_finalclass_field' => '',
  152. );
  153. MetaModel::Init_Params($aParams);
  154. MetaModel::Init_InheritAttributes();
  155. MetaModel::Init_AddAttribute(new AttributeExternalKey("ticket_id", array("targetclass"=>'Ticket', "allowed_values"=>null, "sql"=>'ticket_id', "is_null_allowed"=>false, "on_target_delete"=>DEL_AUTO, "depends_on"=>array())));
  156. MetaModel::Init_AddAttribute(new AttributeExternalKey("functionalci_id", array("targetclass"=>'FunctionalCI', "allowed_values"=>null, "sql"=>'functionalci_id', "is_null_allowed"=>false, "on_target_delete"=>DEL_AUTO, "depends_on"=>array())));
  157. MetaModel::Init_SetZListItems('details', array (
  158. 0 => 'ticket_id',
  159. 1 => 'functionalci_id',
  160. ));
  161. MetaModel::Init_SetZListItems('standard_search', array (
  162. 0 => 'ticket_id',
  163. 1 => 'functionalci_id',
  164. ));
  165. MetaModel::Init_SetZListItems('list', array (
  166. 0 => 'ticket_id',
  167. 1 => 'functionalci_id',
  168. ));
  169. }
  170. }