-- Copyright (C) 2003 Media Net Link, Inc. Danville, CA 94526 USA
-- 
-- This file is part of AthenaRMS.
-- 
-- AthenaRMS 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; either version 2 of the License, or
-- (at your option) any later version.
-- 
-- AthenaRMS 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

create table person_crm_map (
  pcrm_map_id int primary key,
  person_id int not null,
  crm_id int not null,
  support_drop_down char(1) default 'Y' not null,
  escalated_drop_down char(1) default 'Y' not null,
  modify_tickets char(1) default 'Y' not null,
  updated_date timestamp,
  updated_by varchar(255),
  created_date timestamp,
  created_by varchar(255),
  foreign key (person_id) references person (person_id),
  foreign key (crm_id) references company_crm (crm_id),
  foreign key (support_drop_down) references yes_no (yes_no),
  foreign key (escalated_drop_down) references yes_no (yes_no),
  foreign key (modify_tickets) references modify_ticket_types (modify_tickets),
  unique (crm_id, person_id)
);
