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

32 lines
640 B
TypeScript
Raw Normal View History

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