feature: initial commit

This commit is contained in:
Andy Burke 2025-06-24 15:40:30 -07:00
commit 2c27f003c9
15 changed files with 1601 additions and 0 deletions

25
models/session.ts Normal file
View file

@ -0,0 +1,25 @@
import { FSDB_COLLECTION } from 'jsr:@andyburke/fsdb';
import { FSDB_INDEXER_SYMLINKS } from 'jsr:@andyburke/fsdb/indexers';
import { by_lurid } from 'jsr:@andyburke/fsdb/organizers';
export type SESSION = {
id: string;
user_id: string;
secret: string;
timestamps: {
created: string;
expires: string;
ended: string;
};
};
export const SESSIONS = new FSDB_COLLECTION<SESSION>({
name: 'sessions',
indexers: {
user_id: new FSDB_INDEXER_SYMLINKS<SESSION>({
name: 'user_id',
field: 'user_id',
organize: by_lurid
})
}
});