mirror of
https://github.com/hex248/sprint.git
synced 2026-02-07 18:23:03 +00:00
iconPreference column
This commit is contained in:
@@ -297,6 +297,7 @@ export const UserUpdateRequestSchema = z.object({
|
||||
.regex(/[0-9]/, "Password must contain a number")
|
||||
.optional(),
|
||||
avatarURL: z.string().url().nullable().optional(),
|
||||
iconPreference: z.enum(["lucide", "pixel", "phosphor"]).optional(),
|
||||
});
|
||||
|
||||
export type UserUpdateRequest = z.infer<typeof UserUpdateRequestSchema>;
|
||||
|
||||
@@ -101,6 +101,7 @@ export {
|
||||
USER_USERNAME_MAX_LENGTH,
|
||||
} from "./constants";
|
||||
export type {
|
||||
IconStyle,
|
||||
IssueAssigneeInsert,
|
||||
IssueAssigneeRecord,
|
||||
IssueInsert,
|
||||
@@ -135,6 +136,7 @@ export {
|
||||
IssueAssigneeSelectSchema,
|
||||
IssueInsertSchema,
|
||||
IssueSelectSchema,
|
||||
iconStyles,
|
||||
Organisation,
|
||||
OrganisationInsertSchema,
|
||||
OrganisationMember,
|
||||
|
||||
@@ -27,12 +27,16 @@ export const DEFAULT_STATUS_COLOURS: Record<string, string> = {
|
||||
MERGED: DEFAULT_STATUS_COLOUR,
|
||||
};
|
||||
|
||||
export const iconStyles = ["lucide", "pixel", "phosphor"] as const;
|
||||
export type IconStyle = (typeof iconStyles)[number];
|
||||
|
||||
export const User = pgTable("User", {
|
||||
id: integer().primaryKey().generatedAlwaysAsIdentity(),
|
||||
name: varchar({ length: USER_NAME_MAX_LENGTH }).notNull(),
|
||||
username: varchar({ length: USER_USERNAME_MAX_LENGTH }).notNull().unique(),
|
||||
passwordHash: varchar({ length: 255 }).notNull(),
|
||||
avatarURL: varchar({ length: 512 }),
|
||||
iconPreference: varchar({ length: 10 }).notNull().default("lucide").$type<IconStyle>(),
|
||||
createdAt: timestamp({ withTimezone: false }).defaultNow(),
|
||||
updatedAt: timestamp({ withTimezone: false }).defaultNow(),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user