﻿CREATE TABLE [dbo].[WATER_EVENT_BOATS]
(
	[BoatId] UNIQUEIDENTIFIER NOT NULL, 
	[WaterEventId] UNIQUEIDENTIFIER NOT NULL,
    [Name] NVARCHAR(50) NOT NULL, 
    [SeatCount] TINYINT NOT NULL, 
    [IsCoxed] BIT NOT NULL, 
    [ClubBoatId] UNIQUEIDENTIFIER NULL, 
    CONSTRAINT [PK__WATER_EVENT_BOATS] PRIMARY KEY ([BoatId]), 
    CONSTRAINT [FK__WATER_EVENT_BOATS__WATER_EVENTS] FOREIGN KEY ([WaterEventId]) REFERENCES [WATER_EVENTS]([EventId]), 
    CONSTRAINT [CK__WATER_EVENT_BOATS__SeatCount] CHECK (SeatCount > 0 AND SeatCount <= 8)
)
