mirror of
https://github.com/MrSedan/neuro-reply-website.git
synced 2026-01-15 13:09:43 +03:00
fix: prettier)
This commit is contained in:
@@ -1,43 +1,43 @@
|
||||
import { Column, Entity, JoinColumn, ManyToOne, OneToMany, PrimaryGeneratedColumn } from 'typeorm';
|
||||
import { Admin } from './admin.entity';
|
||||
import { Image } from './image.entity';
|
||||
import { Column, Entity, JoinColumn, ManyToOne, OneToMany, PrimaryGeneratedColumn } from "typeorm";
|
||||
import { Admin } from "./admin.entity";
|
||||
import { Image } from "./image.entity";
|
||||
@Entity()
|
||||
export class Post {
|
||||
constructor(props?: Partial<Post>) {
|
||||
Object.assign(this, props);
|
||||
}
|
||||
constructor(props?: Partial<Post>) {
|
||||
Object.assign(this, props);
|
||||
}
|
||||
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
public uuid!: string;
|
||||
@PrimaryGeneratedColumn("uuid")
|
||||
public uuid!: string;
|
||||
|
||||
@Column({ default: false })
|
||||
public posted!: boolean;
|
||||
@Column({ default: false })
|
||||
public posted!: boolean;
|
||||
|
||||
@Column({ nullable: true })
|
||||
public text?: string;
|
||||
@Column({ nullable: true })
|
||||
public text?: string;
|
||||
|
||||
@Column({ nullable: true })
|
||||
public media_group_id: string;
|
||||
@Column({ nullable: true })
|
||||
public media_group_id: string;
|
||||
|
||||
@Column({ type: 'timestamptz' })
|
||||
public timestamp!: Date;
|
||||
@Column({ type: "timestamptz" })
|
||||
public timestamp!: Date;
|
||||
|
||||
@Column({ type: 'timestamptz', nullable: true })
|
||||
public edit_timestamp?: Date;
|
||||
@Column({ type: "timestamptz", nullable: true })
|
||||
public edit_timestamp?: Date;
|
||||
|
||||
@Column({ nullable: false })
|
||||
public from_user_id!: string;
|
||||
@Column({ nullable: false })
|
||||
public from_user_id!: string;
|
||||
|
||||
@ManyToOne(() => Admin, (admin) => admin.user.id)
|
||||
@JoinColumn({ name: 'from_user_id', referencedColumnName: 'user_id' })
|
||||
public from_user!: Admin;
|
||||
@ManyToOne(() => Admin, (admin) => admin.user.id)
|
||||
@JoinColumn({ name: "from_user_id", referencedColumnName: "user_id" })
|
||||
public from_user!: Admin;
|
||||
|
||||
@OneToMany(() => Image, (image) => image.post)
|
||||
public images: Image[];
|
||||
@OneToMany(() => Image, (image) => image.post)
|
||||
public images: Image[];
|
||||
|
||||
@Column({ nullable: true })
|
||||
public message_entities?: string;
|
||||
@Column({ nullable: true })
|
||||
public message_entities?: string;
|
||||
|
||||
@Column({ default: false })
|
||||
public deleted: boolean;
|
||||
@Column({ default: false })
|
||||
public deleted: boolean;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user