mirror of
https://github.com/CaramelFur/Picsur.git
synced 2025-11-14 07:45:39 +01:00
reorganizing
This commit is contained in:
20
backend/src/models/entities/user.entity.ts
Normal file
20
backend/src/models/entities/user.entity.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { EUser } from 'picsur-shared/dist/entities/user.entity';
|
||||
import { Column, Entity, Index, PrimaryGeneratedColumn } from 'typeorm';
|
||||
|
||||
// Different data for public and private
|
||||
|
||||
@Entity()
|
||||
export class EUserBackend extends EUser {
|
||||
@PrimaryGeneratedColumn()
|
||||
override id?: number;
|
||||
|
||||
@Index()
|
||||
@Column({ unique: true })
|
||||
override username: string;
|
||||
|
||||
@Column({ default: false })
|
||||
override isAdmin: boolean;
|
||||
|
||||
@Column({ select: false })
|
||||
override password?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user