feat: split out messages table from main database

This commit is contained in:
spiral 2022-11-23 09:17:19 +00:00
parent 09ac002d26
commit bf7747ab34
No known key found for this signature in database
GPG key ID: 244A11E4B0BCF40E
14 changed files with 119 additions and 84 deletions

View file

@ -89,4 +89,12 @@ public partial class ModelRepository
if (oldMember != null)
_ = _dispatch.Dispatch(oldMember.System, oldMember.Uuid, DispatchEvent.DELETE_MEMBER);
}
public async Task<bool> IsMemberOwnedByAccount(MemberId id, ulong userId)
{
return await _db.QueryFirst<bool>(
"select true from accounts, members where members.id = @member and accounts.uid = @account and members.system = accounts.system",
new { member = id, account = userId }
);
}
}