1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00
pigallery2/backend/model/sql/enitites/UserEntity.ts

27 lines
443 B
TypeScript
Raw Normal View History

2016-12-27 23:09:47 +08:00
import {UserDTO, UserRoles} from "../../../../common/entities/UserDTO";
2017-07-04 01:17:49 +08:00
import {Column, Entity, PrimaryGeneratedColumn} from "typeorm";
2016-12-27 23:09:47 +08:00
2017-02-05 23:19:35 +08:00
@Entity()
2016-12-27 23:09:47 +08:00
export class UserEntity implements UserDTO {
2017-07-04 01:17:49 +08:00
@PrimaryGeneratedColumn()
id: number;
2016-12-27 23:09:47 +08:00
2017-07-04 01:17:49 +08:00
@Column({
length: 500
})
name: string;
2016-12-27 23:09:47 +08:00
2017-07-04 01:17:49 +08:00
@Column({
length: 500
})
password: string;
2016-12-27 23:09:47 +08:00
2017-07-04 01:17:49 +08:00
@Column("int")
role: UserRoles;
2016-12-27 23:09:47 +08:00
2017-07-08 04:54:18 +08:00
@Column("string", {nullable: true})
2017-07-04 01:17:49 +08:00
permissions: string[];
}