refactor: use factory and kysely types for partner repository (#16812)

This commit is contained in:
Jason Rasmussen 2025-03-11 16:29:56 -04:00 committed by GitHub
parent 83ed03920e
commit 16fd19994b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 207 additions and 112 deletions

View file

@ -92,6 +92,17 @@ export type AuthSession = {
id: string;
};
export type Partner = {
sharedById: string;
sharedBy: User;
sharedWithId: string;
sharedWith: User;
createdAt: Date;
updatedAt: Date;
updateId: string;
inTimeline: boolean;
};
export const columns = {
ackEpoch: (columnName: 'createdAt' | 'updatedAt' | 'deletedAt') =>
sql.raw<string>(`extract(epoch from "${columnName}")::text`).as('ackEpoch'),