create table mailings_read_clients (
    id bigint primary key,
    mailing_id bigint not null references mailings(id),
    client_id bigint not null references clients(id),
    mailing_message_id bigint not null references mailing_messages(id),
    read bool default false,
    sent bool default false,

    created_at TIMESTAMP WITH TIME ZONE NOT NULL,
    updated_at TIMESTAMP WITH TIME ZONE NOT NULL
);

create sequence mailings_read_clients_id_seq;