mirror of
https://git.sr.ht/~roxwize/mipilin
synced 2025-05-10 23:33:07 +00:00
invite cooooddeesss
Signed-off-by: roxwize <rae@roxwize.xyz>
This commit is contained in:
parent
7b563f5c31
commit
5abe0b5fad
22 changed files with 2326 additions and 16 deletions
12
db/schema.ts
12
db/schema.ts
|
@ -29,7 +29,9 @@ export const updates = pgTable("updates", {
|
|||
|
||||
export const journalEntries = pgTable("journal_entries", {
|
||||
id: integer().primaryKey().generatedAlwaysAsIdentity(),
|
||||
user: integer().references(() => users.id, { onDelete: "cascade" }).notNull(),
|
||||
user: integer()
|
||||
.references(() => users.id, { onDelete: "cascade" })
|
||||
.notNull(),
|
||||
moodChange: integer("mood-change").default(0).notNull(),
|
||||
entry: varchar({ length: 4096 }).default("").notNull(),
|
||||
visibility: integer().default(1).notNull(),
|
||||
|
@ -61,3 +63,11 @@ export const follows = pgTable(
|
|||
};
|
||||
}
|
||||
);
|
||||
|
||||
export const inviteCodes = pgTable("invite_codes", {
|
||||
token: varchar({ length: 22 }).primaryKey(),
|
||||
user: integer("user_id").references(() => users.id, { onDelete: "cascade" }),
|
||||
granted: timestamp().notNull(),
|
||||
expires: timestamp().default(new Date(0)),
|
||||
confersModerator: boolean("confers_moderator").default(false)
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue