CREATE TABLE [dbo].[claim_actors]
(
[clact_claim_id] [int] NOT NULL,
[clact_actor_id] [int] NOT NULL,
[clact_type_code] [dbo].[ais_code_short] NULL,
[clact_company_id] [int] NULL,
[clact_identification] [dbo].[ais_code_long] NULL,
[clact_type_code__tiers] [dbo].[ais_code_short] NULL,
[clact_order] [smallint] NULL,
[clact_order2] AS (isnull([clact_order],(32767)))
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[claim_actors] ADD CONSTRAINT [PK_claim_actors] PRIMARY KEY CLUSTERED  ([clact_claim_id], [clact_actor_id]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[claim_actors] ADD CONSTRAINT [FK_claim_actors_act_actors] FOREIGN KEY ([clact_actor_id]) REFERENCES [dbo].[act_actors] ([act_actor_id])
GO
ALTER TABLE [dbo].[claim_actors] ADD CONSTRAINT [FK_claim_actors_act_cies] FOREIGN KEY ([clact_company_id]) REFERENCES [dbo].[act_cies] ([cie_actor_id])
GO
ALTER TABLE [dbo].[claim_actors] ADD CONSTRAINT [FK_claim_actors_act_types] FOREIGN KEY ([clact_type_code]) REFERENCES [dbo].[act_types] ([at_type_code])
GO
ALTER TABLE [dbo].[claim_actors] ADD CONSTRAINT [FK_claim_actors_claim_claims] FOREIGN KEY ([clact_claim_id]) REFERENCES [dbo].[claim_claims] ([cl_claim_id])
GO
ALTER TABLE [dbo].[claim_actors] ADD CONSTRAINT [FK_claim_actors_nm_claims_tiers_types] FOREIGN KEY ([clact_type_code__tiers]) REFERENCES [dbo].[nm_claims_tiers_types] ([tit_type_code])
GO
