1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2025-01-14 14:43:17 +08:00
pigallery2/backend/model/sql/enitites/SharingEntity.ts

32 lines
640 B
TypeScript
Raw Normal View History

2017-10-19 12:08:07 -04:00
import {Column, Entity, ManyToOne, PrimaryGeneratedColumn} from "typeorm";
2017-07-03 19:17:49 +02:00
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;
2017-10-19 12:08:07 -04:00
@Column()
2017-07-03 19:17:49 +02:00
sharingKey: string;
2017-10-19 12:08:07 -04:00
@Column()
2017-07-03 19:17:49 +02:00
path: string;
2017-10-19 12:08:07 -04:00
@Column({type: "text", nullable: true})
2017-07-03 19:17:49 +02:00
password: string;
2017-10-19 12:08:07 -04:00
@Column()
2017-07-03 19:17:49 +02:00
expires: number;
2017-10-19 12:08:07 -04:00
@Column()
2017-07-03 19:17:49 +02:00
timeStamp: number;
2017-10-19 12:08:07 -04:00
@Column()
2017-07-03 19:17:49 +02:00
includeSubfolders: boolean;
@ManyToOne(type => UserEntity)
creator: UserDTO;
}