-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented user registration feature with input validation, password…
… hashing, and database integration
- Loading branch information
1 parent
516fa4e
commit ad7f09a
Showing
3 changed files
with
35 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { | ||
Entity, | ||
PrimaryGeneratedColumn, | ||
Column, | ||
Unique, | ||
} from 'typeorm'; | ||
|
||
Check warning on line 7 in src/entity/User.ts GitHub Actions / build-lint-test-coverage
|
||
@Entity() | ||
@Unique(['email']) | ||
export class User { | ||
@PrimaryGeneratedColumn() | ||
id!: number; | ||
|
||
Check warning on line 13 in src/entity/User.ts GitHub Actions / build-lint-test-coverage
|
||
@Column() | ||
firstName!: string; | ||
|
||
Check warning on line 16 in src/entity/User.ts GitHub Actions / build-lint-test-coverage
|
||
@Column() | ||
lastName!: string; | ||
|
||
Check warning on line 19 in src/entity/User.ts GitHub Actions / build-lint-test-coverage
|
||
@Column() | ||
email!: string; | ||
|
||
Check warning on line 22 in src/entity/User.ts GitHub Actions / build-lint-test-coverage
|
||
@Column() | ||
password!: string; | ||
|
||
Check warning on line 25 in src/entity/User.ts GitHub Actions / build-lint-test-coverage
|
||
@Column({ default: "User"} ) | ||
userType!: string; | ||
} | ||
|
||
Check warning on line 29 in src/entity/User.ts GitHub Actions / build-lint-test-coverage
|