mirror of
https://github.com/MrSedan/neuro-reply-website.git
synced 2026-01-15 04:59:42 +03:00
fix: prettier)
This commit is contained in:
@@ -1,25 +1,25 @@
|
||||
import { Column, Entity, JoinColumn, ManyToOne, PrimaryColumn } from 'typeorm';
|
||||
import { Post } from './post.entity';
|
||||
import { Column, Entity, JoinColumn, ManyToOne, PrimaryColumn } from "typeorm";
|
||||
import { Post } from "./post.entity";
|
||||
|
||||
@Entity()
|
||||
export class Image {
|
||||
constructor(props?: Partial<Image>) {
|
||||
Object.assign(this, props);
|
||||
}
|
||||
constructor(props?: Partial<Image>) {
|
||||
Object.assign(this, props);
|
||||
}
|
||||
|
||||
@PrimaryColumn()
|
||||
public message_id!: number;
|
||||
@PrimaryColumn()
|
||||
public message_id!: number;
|
||||
|
||||
@Column({ nullable: false })
|
||||
public file_id!: string;
|
||||
@Column({ nullable: false })
|
||||
public file_id!: string;
|
||||
|
||||
@Column({ default: false })
|
||||
public has_spoiler!: boolean;
|
||||
@Column({ default: false })
|
||||
public has_spoiler!: boolean;
|
||||
|
||||
@Column({ nullable: false })
|
||||
public post_uuid!: string;
|
||||
@Column({ nullable: false })
|
||||
public post_uuid!: string;
|
||||
|
||||
@ManyToOne(() => Post, (post) => post.uuid, { onDelete: 'CASCADE' })
|
||||
@JoinColumn({ name: 'post_uuid' })
|
||||
public post!: Post;
|
||||
@ManyToOne(() => Post, (post) => post.uuid, { onDelete: "CASCADE" })
|
||||
@JoinColumn({ name: "post_uuid" })
|
||||
public post!: Post;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user