2018-03-31 03:30:30 +08:00
|
|
|
import {Column, Entity, ManyToOne, PrimaryGeneratedColumn} from 'typeorm';
|
|
|
|
import {SharingDTO} from '../../../../common/entities/SharingDTO';
|
|
|
|
import {UserEntity} from './UserEntity';
|
|
|
|
import {UserDTO} from '../../../../common/entities/UserDTO';
|
2017-07-04 01:17:49 +08:00
|
|
|
|
|
|
|
@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;
|
|
|
|
|
2018-03-31 03:30:30 +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;
|
|
|
|
}
|