1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2025-01-14 14:43:17 +08:00

23 lines
404 B
TypeScript
Raw Normal View History

2016-12-27 16:09:47 +01:00
import {UserDTO, UserRoles} from "../../../../common/entities/UserDTO";
2017-07-03 19:17:49 +02:00
import {Column, Entity, PrimaryGeneratedColumn} from "typeorm";
2016-12-27 16:09:47 +01:00
2017-02-05 16:19:35 +01:00
@Entity()
2016-12-27 16:09:47 +01:00
export class UserEntity implements UserDTO {
2017-07-03 19:17:49 +02:00
@PrimaryGeneratedColumn()
id: number;
2016-12-27 16:09:47 +01:00
2017-07-21 19:14:22 +02:00
@Column()
2017-07-03 19:17:49 +02:00
name: string;
2016-12-27 16:09:47 +01:00
2017-07-21 19:14:22 +02:00
@Column()
2017-07-03 19:17:49 +02:00
password: string;
2016-12-27 16:09:47 +01:00
2017-07-21 19:14:22 +02:00
@Column("smallint")
2017-07-03 19:17:49 +02:00
role: UserRoles;
2016-12-27 16:09:47 +01:00
2017-10-19 12:08:07 -04:00
@Column("text", {nullable: true})
2017-07-03 19:17:49 +02:00
permissions: string[];
}