1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2025-01-14 14:43:17 +08:00
2017-07-03 19:17:49 +02:00

32 lines
705 B
TypeScript

import {Column, EmbeddableEntity, Embedded, Entity, ManyToOne, PrimaryGeneratedColumn} from "typeorm";
import {SharingDTO} from "../../../../common/entities/SharingDTO";
import {UserEntity} from "./UserEntity";
import {UserDTO} from "../../../../common/entities/UserDTO";
@Entity()
export class SharingEntity implements SharingDTO {
@PrimaryGeneratedColumn()
id: number;
@Column("string")
sharingKey: string;
@Column("string")
path: string;
@Column("string", {nullable: true})
password: string;
@Column("number")
expires: number;
@Column("number")
timeStamp: number;
@Column("boolean")
includeSubfolders: boolean;
@ManyToOne(type => UserEntity)
creator: UserDTO;
}