Move in progress apps temporarily
This commit is contained in:
parent
ba04aa108c
commit
6eaaf8e9be
360 changed files with 6171 additions and 55 deletions
26
fix/metamigo-common/records/session.ts
Normal file
26
fix/metamigo-common/records/session.ts
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
import { recordInfo } from "./record-info";
|
||||
import { RepositoryBase } from "./base";
|
||||
import { Flavor, UUID } from "../helpers";
|
||||
import { UserId } from "./user";
|
||||
|
||||
export type SessionId = Flavor<UUID, "Session Id">;
|
||||
|
||||
export interface UnsavedSession {
|
||||
userId: UserId;
|
||||
expires: Date;
|
||||
sessionToken: string;
|
||||
accessToken: string;
|
||||
}
|
||||
|
||||
export interface SavedSession extends UnsavedSession {
|
||||
id: SessionId;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
}
|
||||
|
||||
export const SessionRecord = recordInfo<UnsavedSession, SavedSession>(
|
||||
"app_private",
|
||||
"sessions"
|
||||
);
|
||||
|
||||
export class SessionRecordRepository extends RepositoryBase(SessionRecord) {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue