added update image route

This commit is contained in:
2024-04-20 14:52:43 +07:00
parent ed8c0e77f2
commit ee9963c3b6
11 changed files with 914 additions and 35 deletions

View File

@@ -24,6 +24,7 @@ export const user = sqliteTable(
twitter: text("twitter"),
tiktok: text("tiktok"),
otherSocial: text("other_social"),
image: text("image"),
email: text("email"),
job: text("job").notNull(),
education: text("education").notNull(),
@@ -38,6 +39,7 @@ export const user = sqliteTable(
},
(t) => ({
phone_idx: index("phone_idx").on(t.phone),
image_idx: index("image_idx").on(t.image),
})
);
@@ -127,10 +129,12 @@ export const provinceRelation = relations(province, ({ many }) => ({
zones: many(zone),
}));
//----------------PhoneToken
export const phoneToken = sqliteTable("phone_tokens", {
phone: text("phone").primaryKey(),
token: text("token").notNull(),
//----------------ImageToUser
export const imageToUser = sqliteTable("image_to_user", {
userId: integer("user_id")
.primaryKey()
.references(() => user.id),
imageName: text("image_name").notNull(),
createdOn: integer("created_on", { mode: "timestamp" }).default(
sql`CURRENT_TIMESTAMP`
),