feature: switch everything to an invite-only model
This commit is contained in:
parent
a3302d2eff
commit
49c7a135d0
10 changed files with 445 additions and 3 deletions
36
models/signups.ts
Normal file
36
models/signups.ts
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
import { FSDB_COLLECTION } from '@andyburke/fsdb';
|
||||
import { FSDB_INDEXER_SYMLINKS } from '@andyburke/fsdb/indexers';
|
||||
import { by_lurid } from '@andyburke/fsdb/organizers';
|
||||
|
||||
export type SIGNUP = {
|
||||
id: string;
|
||||
invite_code_id: string;
|
||||
referring_user_id: string;
|
||||
user_id: string;
|
||||
timestamps: {
|
||||
created: string;
|
||||
};
|
||||
};
|
||||
|
||||
export const SIGNUPS = new FSDB_COLLECTION<SIGNUP>({
|
||||
name: 'signups',
|
||||
indexers: {
|
||||
user_id: new FSDB_INDEXER_SYMLINKS<SIGNUP>({
|
||||
name: 'user_id',
|
||||
field: 'user_id',
|
||||
organize: by_lurid
|
||||
}),
|
||||
invite_code_id: new FSDB_INDEXER_SYMLINKS<SIGNUP>({
|
||||
name: 'invite_code_id',
|
||||
field: 'invite_code_id',
|
||||
to_many: true,
|
||||
organize: by_lurid
|
||||
}),
|
||||
referring_user_id: new FSDB_INDEXER_SYMLINKS<SIGNUP>({
|
||||
name: 'referring_user_id',
|
||||
field: 'referring_user_id',
|
||||
to_many: true,
|
||||
organize: by_lurid
|
||||
})
|
||||
}
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue