加入userSession实体
This commit is contained in:
20
tone-page-server/src/user/entities/user-session.entity.ts
Normal file
20
tone-page-server/src/user/entities/user-session.entity.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, Index, PrimaryGeneratedColumn } from "typeorm";
|
||||
|
||||
@Entity()
|
||||
@Index(['sessionId', 'userId'])
|
||||
export class UserSession {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id: string;
|
||||
|
||||
@Column({ length: 36 })
|
||||
sessionId: string;
|
||||
|
||||
@Column({ length: 36 })
|
||||
userId: string;
|
||||
|
||||
@CreateDateColumn({ precision: 3 })
|
||||
createdAt: Date;
|
||||
|
||||
@DeleteDateColumn({ nullable: true, precision: 3 })
|
||||
deletedAt: Date;
|
||||
}
|
||||
Reference in New Issue
Block a user