async userById(id: string) {
const user = await this.db.query.users.findFirst({
where: eq(users.id, id),
with: {
teamMemberships: {
columns: {
role: true,
createdAt: true,
},
with: {
team: true,
},
},
},
});
return user;
}
async userById(id: string) {
const user = await this.db.query.users.findFirst({
where: eq(users.id, id),
with: {
teamMemberships: {
columns: {
role: true,
createdAt: true,
},
with: {
team: true,
},
},
},
});
return user;
}