mirror of
https://github.com/CaramelFur/Picsur.git
synced 2025-11-13 23:35:39 +01:00
21 lines
537 B
TypeScript
21 lines
537 B
TypeScript
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("uuid")
|
|
override id?: string;
|
|
|
|
@Index()
|
|
@Column({ nullable: false, unique: true })
|
|
override username: string;
|
|
|
|
@Column('text', { nullable: false, array: true })
|
|
override roles: string[];
|
|
|
|
@Column({ nullable: false, select: false })
|
|
override password?: string;
|
|
}
|