mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-27 20:48:46 +02:00
188 lines
7.6 KiB
PHP
Executable File
188 lines
7.6 KiB
PHP
Executable File
<?php
|
|
//
|
|
// File generated by ... on the 2012-06-05T18:30:57+0200
|
|
// Please do not edit manually
|
|
//
|
|
//
|
|
// Copyright (C) 2010 Combodo SARL
|
|
//
|
|
// ben on met quoi ici ?
|
|
// Signé: Romain
|
|
//
|
|
// This program is free software; you can redistribute it and/or modify
|
|
// it under the terms of the GNU General Public License as published by
|
|
// the Free Software Foundation; version 3 of the License.
|
|
//
|
|
// This program is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU General Public License for more details.
|
|
//
|
|
// You should have received a copy of the GNU General Public License
|
|
// along with this program; if not, write to the Free Software
|
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
/**
|
|
* Classes and menus for itop-tickets (version 1.0.0)
|
|
*
|
|
*/
|
|
|
|
|
|
/**
|
|
* Persistent classes for a CMDB
|
|
*
|
|
* @copyright Copyright (C) 2010-2012 Combodo SARL
|
|
* @license http://opensource.org/licenses/AGPL-3.0
|
|
*/
|
|
class Ticket extends cmdbAbstractObject
|
|
{
|
|
public static function Init()
|
|
{
|
|
$aParams = array
|
|
(
|
|
'category' => 'bizmodel,searchable,structure',
|
|
'key_type' => 'autoincrement',
|
|
'name_attcode' => 'ref',
|
|
'state_attcode' => '',
|
|
'reconc_keys' => array('ref'),
|
|
'db_table' => 'ticket',
|
|
'db_key_field' => 'id',
|
|
'db_finalclass_field' => '',
|
|
);
|
|
MetaModel::Init_Params($aParams);
|
|
MetaModel::Init_InheritAttributes();
|
|
MetaModel::Init_AddAttribute(new AttributeString("ref", array("allowed_values"=>null, "sql"=>'ref', "default_value"=>'', "is_null_allowed"=>false, "depends_on"=>array())));
|
|
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())));
|
|
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())));
|
|
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())));
|
|
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())));
|
|
MetaModel::Init_AddAttribute(new AttributeString("title", array("allowed_values"=>null, "sql"=>'title', "default_value"=>'', "is_null_allowed"=>true, "depends_on"=>array())));
|
|
MetaModel::Init_AddAttribute(new AttributeText("description", array("allowed_values"=>null, "sql"=>'description', "default_value"=>'', "is_null_allowed"=>true, "depends_on"=>array())));
|
|
MetaModel::Init_AddAttribute(new AttributeDateTime("start_date", array("allowed_values"=>null, "sql"=>'start_date', "default_value"=>'', "is_null_allowed"=>true, "depends_on"=>array())));
|
|
MetaModel::Init_AddAttribute(new AttributeDateTime("end_date", array("allowed_values"=>null, "sql"=>'end_date', "default_value"=>'', "is_null_allowed"=>true, "depends_on"=>array())));
|
|
MetaModel::Init_AddAttribute(new AttributeDateTime("last_update", array("allowed_values"=>null, "sql"=>'last_update', "default_value"=>'', "is_null_allowed"=>true, "depends_on"=>array())));
|
|
MetaModel::Init_AddAttribute(new AttributeDateTime("close_date", array("allowed_values"=>null, "sql"=>'close_date', "default_value"=>'', "is_null_allowed"=>true, "depends_on"=>array())));
|
|
MetaModel::Init_AddAttribute(new AttributeCaseLog("private_log", array("allowed_values"=>null, "sql"=>'private_log', "default_value"=>'', "is_null_allowed"=>false, "depends_on"=>array())));
|
|
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())));
|
|
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())));
|
|
|
|
|
|
MetaModel::Init_SetZListItems('details', array (
|
|
0 => 'ref',
|
|
1 => 'organization_id',
|
|
2 => 'caller_id',
|
|
3 => 'team_id',
|
|
4 => 'agent_id',
|
|
5 => 'title',
|
|
6 => 'description',
|
|
7 => 'start_date',
|
|
8 => 'end_date',
|
|
9 => 'last_update',
|
|
10 => 'close_date',
|
|
11 => 'private_log',
|
|
12 => 'contacts_list',
|
|
13 => 'functionalcis_list',
|
|
));
|
|
MetaModel::Init_SetZListItems('standard_search', array (
|
|
0 => 'ref',
|
|
1 => 'title',
|
|
2 => 'description',
|
|
3 => 'start_date',
|
|
4 => 'end_date',
|
|
5 => 'last_update',
|
|
6 => 'close_date',
|
|
));
|
|
MetaModel::Init_SetZListItems('list', array (
|
|
0 => 'ref',
|
|
1 => 'organization_id',
|
|
2 => 'title',
|
|
3 => 'caller_id',
|
|
4 => 'team_id',
|
|
5 => 'agent_id',
|
|
6 => 'start_date',
|
|
));
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
class lnkContactToTicket extends cmdbAbstractObject
|
|
{
|
|
public static function Init()
|
|
{
|
|
$aParams = array
|
|
(
|
|
'category' => 'bizModel',
|
|
'key_type' => 'autoincrement',
|
|
'name_attcode' => array('ticket_id', 'contact_id'),
|
|
'state_attcode' => '',
|
|
'reconc_keys' => array('ticket_id', 'contact_id'),
|
|
'db_table' => 'lnkcontacttoticket',
|
|
'db_key_field' => 'id',
|
|
'db_finalclass_field' => '',
|
|
);
|
|
MetaModel::Init_Params($aParams);
|
|
MetaModel::Init_InheritAttributes();
|
|
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())));
|
|
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())));
|
|
|
|
|
|
MetaModel::Init_SetZListItems('details', array (
|
|
0 => 'ticket_id',
|
|
1 => 'contact_id',
|
|
));
|
|
MetaModel::Init_SetZListItems('standard_search', array (
|
|
0 => 'ticket_id',
|
|
1 => 'contact_id',
|
|
));
|
|
MetaModel::Init_SetZListItems('list', array (
|
|
0 => 'ticket_id',
|
|
1 => 'contact_id',
|
|
));
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
class lnkFunctionalCIToTicket extends cmdbAbstractObject
|
|
{
|
|
public static function Init()
|
|
{
|
|
$aParams = array
|
|
(
|
|
'category' => 'bizModel',
|
|
'key_type' => 'autoincrement',
|
|
'name_attcode' => array('ticket_id', 'functionalci_id'),
|
|
'state_attcode' => '',
|
|
'reconc_keys' => array('ticket_id', 'functionalci_id'),
|
|
'db_table' => 'lnkfunctionalcitoticket',
|
|
'db_key_field' => 'id',
|
|
'db_finalclass_field' => '',
|
|
);
|
|
MetaModel::Init_Params($aParams);
|
|
MetaModel::Init_InheritAttributes();
|
|
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())));
|
|
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())));
|
|
|
|
|
|
MetaModel::Init_SetZListItems('details', array (
|
|
0 => 'ticket_id',
|
|
1 => 'functionalci_id',
|
|
));
|
|
MetaModel::Init_SetZListItems('standard_search', array (
|
|
0 => 'ticket_id',
|
|
1 => 'functionalci_id',
|
|
));
|
|
MetaModel::Init_SetZListItems('list', array (
|
|
0 => 'ticket_id',
|
|
1 => 'functionalci_id',
|
|
));
|
|
|
|
}
|
|
|
|
|
|
} |