fix lint
This commit is contained in:
@@ -11,7 +11,7 @@ export class DriveFile {
|
||||
|
||||
@Index()
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The created date of the DriveFile.'
|
||||
comment: 'The created date of the DriveFile.',
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
||||
@@ -19,12 +19,12 @@ export class DriveFile {
|
||||
@Column({
|
||||
...id(),
|
||||
nullable: true,
|
||||
comment: 'The owner ID.'
|
||||
comment: 'The owner ID.',
|
||||
})
|
||||
public userId: User['id'] | null;
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'SET NULL'
|
||||
onDelete: 'SET NULL',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
@@ -32,50 +32,50 @@ export class DriveFile {
|
||||
@Index()
|
||||
@Column('varchar', {
|
||||
length: 128, nullable: true,
|
||||
comment: 'The host of owner. It will be null if the user in local.'
|
||||
comment: 'The host of owner. It will be null if the user in local.',
|
||||
})
|
||||
public userHost: string | null;
|
||||
|
||||
@Index()
|
||||
@Column('varchar', {
|
||||
length: 32,
|
||||
comment: 'The MD5 hash of the DriveFile.'
|
||||
comment: 'The MD5 hash of the DriveFile.',
|
||||
})
|
||||
public md5: string;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 256,
|
||||
comment: 'The file name of the DriveFile.'
|
||||
comment: 'The file name of the DriveFile.',
|
||||
})
|
||||
public name: string;
|
||||
|
||||
@Index()
|
||||
@Column('varchar', {
|
||||
length: 128,
|
||||
comment: 'The content type (MIME) of the DriveFile.'
|
||||
comment: 'The content type (MIME) of the DriveFile.',
|
||||
})
|
||||
public type: string;
|
||||
|
||||
@Column('integer', {
|
||||
comment: 'The file size (bytes) of the DriveFile.'
|
||||
comment: 'The file size (bytes) of the DriveFile.',
|
||||
})
|
||||
public size: number;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512, nullable: true,
|
||||
comment: 'The comment of the DriveFile.'
|
||||
comment: 'The comment of the DriveFile.',
|
||||
})
|
||||
public comment: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128, nullable: true,
|
||||
comment: 'The BlurHash string.'
|
||||
comment: 'The BlurHash string.',
|
||||
})
|
||||
public blurhash: string | null;
|
||||
|
||||
@Column('jsonb', {
|
||||
default: {},
|
||||
comment: 'The any properties of the DriveFile. For example, it includes image width/height.'
|
||||
comment: 'The any properties of the DriveFile. For example, it includes image width/height.',
|
||||
})
|
||||
public properties: { width?: number; height?: number; orientation?: number; avgColor?: string };
|
||||
|
||||
@@ -85,19 +85,19 @@ export class DriveFile {
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512,
|
||||
comment: 'The URL of the DriveFile.'
|
||||
comment: 'The URL of the DriveFile.',
|
||||
})
|
||||
public url: string;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512, nullable: true,
|
||||
comment: 'The URL of the thumbnail of the DriveFile.'
|
||||
comment: 'The URL of the thumbnail of the DriveFile.',
|
||||
})
|
||||
public thumbnailUrl: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512, nullable: true,
|
||||
comment: 'The URL of the webpublic of the DriveFile.'
|
||||
comment: 'The URL of the webpublic of the DriveFile.',
|
||||
})
|
||||
public webpublicUrl: string | null;
|
||||
|
||||
@@ -122,7 +122,7 @@ export class DriveFile {
|
||||
@Index()
|
||||
@Column('varchar', {
|
||||
length: 512, nullable: true,
|
||||
comment: 'The URI of the DriveFile. it will be null when the DriveFile is local.'
|
||||
comment: 'The URI of the DriveFile. it will be null when the DriveFile is local.',
|
||||
})
|
||||
public uri: string | null;
|
||||
|
||||
@@ -135,12 +135,12 @@ export class DriveFile {
|
||||
@Column({
|
||||
...id(),
|
||||
nullable: true,
|
||||
comment: 'The parent folder ID. If null, it means the DriveFile is located in root.'
|
||||
comment: 'The parent folder ID. If null, it means the DriveFile is located in root.',
|
||||
})
|
||||
public folderId: DriveFolder['id'] | null;
|
||||
|
||||
@ManyToOne(type => DriveFolder, {
|
||||
onDelete: 'SET NULL'
|
||||
onDelete: 'SET NULL',
|
||||
})
|
||||
@JoinColumn()
|
||||
public folder: DriveFolder | null;
|
||||
@@ -148,7 +148,7 @@ export class DriveFile {
|
||||
@Index()
|
||||
@Column('boolean', {
|
||||
default: false,
|
||||
comment: 'Whether the DriveFile is NSFW.'
|
||||
comment: 'Whether the DriveFile is NSFW.',
|
||||
})
|
||||
public isSensitive: boolean;
|
||||
|
||||
@@ -158,7 +158,7 @@ export class DriveFile {
|
||||
@Index()
|
||||
@Column('boolean', {
|
||||
default: false,
|
||||
comment: 'Whether the DriveFile is direct link to remote server.'
|
||||
comment: 'Whether the DriveFile is direct link to remote server.',
|
||||
})
|
||||
public isLink: boolean;
|
||||
}
|
||||
|
Reference in New Issue
Block a user