CREATE TABLE [dbo].[ATUserGroup] (
    [ObjectId] UNIQUEIDENTIFIER NOT NULL,
    [ParentId] UNIQUEIDENTIFIER NOT NULL,
    CONSTRAINT [PK_ATUserGroup] PRIMARY KEY ([ObjectId], [ParentId]),
    CONSTRAINT [ATUserGroup_ATUser_User] FOREIGN KEY ([ObjectId]) REFERENCES [dbo].[ATUser] ([ObjectId]),
    CONSTRAINT [ATUserGroup_ATUser_Group] FOREIGN KEY ([ParentId]) REFERENCES [dbo].[ATUser] ([ObjectId])
);

