You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
479 B
30 lines
479 B
4 years ago
|
import {
|
||
|
Entity,
|
||
|
PrimaryGeneratedColumn,
|
||
|
Column,
|
||
|
CreateDateColumn,
|
||
|
UpdateDateColumn,
|
||
|
} from 'typeorm';
|
||
|
|
||
|
@Entity()
|
||
|
export class User {
|
||
|
@PrimaryGeneratedColumn()
|
||
|
public id: number;
|
||
|
|
||
|
@Column({ unique: true })
|
||
|
public email: string;
|
||
|
|
||
|
@Column({ nullable: true })
|
||
|
public plexToken: string;
|
||
|
|
||
|
@CreateDateColumn()
|
||
|
public createdAt: Date;
|
||
|
|
||
|
@UpdateDateColumn()
|
||
|
public updatedAt: Date;
|
||
|
|
||
|
constructor(init?: Partial<User>) {
|
||
|
Object.assign(this, init);
|
||
|
}
|
||
|
}
|