# LEX-3656 https://app.shortcut.com/lex/story/3656/load-chatmembers-from-postgres ## Affected endpoints - listUserChatsV3 - getChatV3 ## Repo & Model ```ts class ShadowUserModel { id: UserId; username: string; firstName: string; pronoun: string; // not strtictly necessary, but need later in LEX-3583 roles: UserRole[] = []; // temporary inactivated account functionality active: boolean; // whether the user is banned // ATTENTION: the firestore property is called `blocked` // Task: Document that in new model banned: boolean; // soft deletion flag deleted: boolean; // mutual blocks blocks: UserId[]; blockedBy: UserId[]; } class ShadowUserRepository { // hard delete user entities // handle delete trigger deleteById(UserId id); // Update or insert user save(ShadowUserModel user): Promise<ShadowUserModel>; findOneById(UserId id): Promise<ShadowUserModel>; findByIds(UserId[] ids): Promise<ShadowUserModel[]>; } ``` ## Tasks - Create model and repo (including migration to create table) - Create migration script (in `functions/src/scripts`) - Adjust controllers/tasks