feat(wip): initial boilerplate
This commit is contained in:
		
							
								
								
									
										45
									
								
								src/users/entities/user.entity.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								src/users/entities/user.entity.ts
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,45 @@ | ||||
| import { | ||||
|   Entity, | ||||
|   Column, | ||||
|   PrimaryGeneratedColumn, | ||||
|   UpdateDateColumn, | ||||
|   DeleteDateColumn, | ||||
|   VersionColumn, | ||||
|   CreateDateColumn, | ||||
| } from 'typeorm'; | ||||
|  | ||||
| @Entity() | ||||
| export class User { | ||||
|   @PrimaryGeneratedColumn('uuid') | ||||
|   id: string; | ||||
|  | ||||
|   @Column() | ||||
|   firstName: string; | ||||
|  | ||||
|   @Column() | ||||
|   lastName: string; | ||||
|  | ||||
|   @Column({ default: true }) | ||||
|   isActive: boolean; | ||||
|  | ||||
|   @CreateDateColumn({ | ||||
|     type: 'timestamp with time zone', | ||||
|     nullable: false, | ||||
|   }) | ||||
|   createdAt: Date; | ||||
|  | ||||
|   @UpdateDateColumn({ | ||||
|     type: 'timestamp with time zone', | ||||
|     nullable: false, | ||||
|   }) | ||||
|   updatedAt: Date; | ||||
|  | ||||
|   @DeleteDateColumn({ | ||||
|     type: 'timestamp with time zone', | ||||
|     nullable: true, | ||||
|   }) | ||||
|   deletedAt: Date; | ||||
|  | ||||
|   @VersionColumn() | ||||
|   version: number; | ||||
| } | ||||
		Reference in New Issue
	
	Block a user