Skip to content
Snippets Groups Projects
Commit 5a305674 authored by RICARDO PRADO FARIA's avatar RICARDO PRADO FARIA
Browse files

Issue#1: ADD user schema

parent 52649b7e
No related branches found
No related tags found
1 merge request!10Issue#1: ADD user schema
......@@ -28,8 +28,20 @@
},
"devDependencies": {
"@types/bcrypt": "^5.0.2",
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
"@types/bcryptjs": "^3.0.0",
"@types/express": "^4.17.21",
=======
"@types/express": "^5.0.0",
>>>>>>> f75e135 (Issue#1: ADD user schema)
=======
"@types/express": "^5.0.0",
>>>>>>> baa1360 ( consertado)
=======
"@types/express": "^5.0.0",
>>>>>>> a20601a32052cb95406df2e75d8114de3dc95e7b
"@types/jsonwebtoken": "^9.0.9",
"@types/node": "^22.13.9",
"@types/pg": "^8.11.11",
......
This diff is collapsed.
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
{
"version": "7",
"dialect": "postgresql",
......@@ -17,4 +20,13 @@
"breakpoints": true
}
]
}
\ No newline at end of file
}
=======
{"version":"7","dialect":"postgresql","entries":[]}
>>>>>>> f75e135 (Issue#1: ADD user schema)
=======
{"version":"7","dialect":"postgresql","entries":[]}
>>>>>>> baa1360 ( consertado)
=======
{"version":"7","dialect":"postgresql","entries":[]}
>>>>>>> a20601a32052cb95406df2e75d8114de3dc95e7b
......@@ -28,4 +28,18 @@ export const purchasesTable = pgTable('pursaches', {
user_id: integer('user_id').notNull().references(() => usersTable.id, { onDelete: "cascade" }),
implant_id: integer('user_id').notNull().references(() => implantsTable.id, { onDelete: "cascade" }),
created_at: timestamp('created_at').notNull().defaultNow(),
})
\ No newline at end of file
})
export const usersTable = pgTable("users", {
id: serial('id').primaryKey().unique().notNull(),
name: varchar('name', { length: 255 }).notNull(),
password: varchar('password', { length: 255 }).notNull(),
email: varchar('email', { length: 255 }).unique().notNull(),
birthday: timestamp('birthday', {mode: 'string'}).notNull(),
cpf: varchar('cpf', { length: 11 }).unique().notNull(),
money: numeric('money').notNull().default("0"),
cyberpsychosis: numeric('cyberpsychosis').notNull().default("0"),
cyberLimit: numeric('cyberLimit').notNull().default("100"),
created_at: timestamp('created_at', { mode: 'date'}).notNull().defaultNow(),
updated_at: timestamp('updated_at', { mode: 'date'}).notNull().defaultNow().$onUpdateFn(() => new Date()),
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment