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,19 +1,19 @@
|
||||
import { Column, Entity, JoinColumn, OneToOne, PrimaryGeneratedColumn } from 'typeorm';
|
||||
import { User } from './user.entity';
|
||||
import { Column, Entity, JoinColumn, OneToOne, PrimaryGeneratedColumn } from "typeorm";
|
||||
import { User } from "./user.entity";
|
||||
|
||||
@Entity()
|
||||
export class Admin {
|
||||
constructor(props?: Partial<Admin>) {
|
||||
Object.assign(this, props);
|
||||
}
|
||||
constructor(props?: Partial<Admin>) {
|
||||
Object.assign(this, props);
|
||||
}
|
||||
|
||||
@PrimaryGeneratedColumn()
|
||||
public id!: number;
|
||||
@PrimaryGeneratedColumn()
|
||||
public id!: number;
|
||||
|
||||
@Column({ nullable: false })
|
||||
public user_id!: string;
|
||||
@Column({ nullable: false })
|
||||
public user_id!: string;
|
||||
|
||||
@OneToOne(() => User, (user) => user.id, { onDelete: 'CASCADE', onUpdate: 'CASCADE' })
|
||||
@JoinColumn({ name: 'user_id' })
|
||||
public user!: User;
|
||||
@OneToOne(() => User, (user) => user.id, { onDelete: "CASCADE", onUpdate: "CASCADE" })
|
||||
@JoinColumn({ name: "user_id" })
|
||||
public user!: User;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
import { Column, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn } from 'typeorm';
|
||||
import { ProxyUser } from './proxy_user.entity';
|
||||
import { Column, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn } from "typeorm";
|
||||
import { ProxyUser } from "./proxy_user.entity";
|
||||
|
||||
@Entity()
|
||||
export class Payment {
|
||||
constructor(props?: Partial<Payment>) {
|
||||
Object.assign(this, props);
|
||||
}
|
||||
constructor(props?: Partial<Payment>) {
|
||||
Object.assign(this, props);
|
||||
}
|
||||
|
||||
@PrimaryGeneratedColumn('increment')
|
||||
public id!: number;
|
||||
@PrimaryGeneratedColumn("increment")
|
||||
public id!: number;
|
||||
|
||||
@Column()
|
||||
public user_uuid!: string;
|
||||
@Column()
|
||||
public user_uuid!: string;
|
||||
|
||||
@Column({ type: 'timestamptz' })
|
||||
public payTime!: Date;
|
||||
@Column({ type: "timestamptz" })
|
||||
public payTime!: Date;
|
||||
|
||||
@ManyToOne(() => ProxyUser, { onDelete: 'CASCADE' })
|
||||
@JoinColumn({ name: 'user_uuid' })
|
||||
user: ProxyUser;
|
||||
@ManyToOne(() => ProxyUser, { onDelete: "CASCADE" })
|
||||
@JoinColumn({ name: "user_uuid" })
|
||||
user: ProxyUser;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -1,35 +1,39 @@
|
||||
import { Column, Entity, JoinColumn, OneToMany, OneToOne, PrimaryGeneratedColumn } from 'typeorm';
|
||||
import { Payment } from './payment.entity';
|
||||
import { User } from './user.entity';
|
||||
import { Column, Entity, JoinColumn, OneToMany, OneToOne, PrimaryGeneratedColumn } from "typeorm";
|
||||
import { Payment } from "./payment.entity";
|
||||
import { User } from "./user.entity";
|
||||
|
||||
@Entity()
|
||||
export class ProxyUser {
|
||||
constructor(props?: Partial<ProxyUser>) {
|
||||
Object.assign(this, props);
|
||||
}
|
||||
constructor(props?: Partial<ProxyUser>) {
|
||||
Object.assign(this, props);
|
||||
}
|
||||
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
public uuid!: string;
|
||||
@PrimaryGeneratedColumn("uuid")
|
||||
public uuid!: string;
|
||||
|
||||
@Column({ nullable: false, unique: true })
|
||||
public userName!: string;
|
||||
@Column({ nullable: false, unique: true })
|
||||
public userName!: string;
|
||||
|
||||
@Column({ nullable: true })
|
||||
public description?: string;
|
||||
@Column({ nullable: true })
|
||||
public description?: string;
|
||||
|
||||
@Column({ nullable: false })
|
||||
public link!: string;
|
||||
@Column({ nullable: false })
|
||||
public link!: string;
|
||||
|
||||
@Column({ nullable: false, type: 'timestamptz' })
|
||||
public connectDate!: Date;
|
||||
@Column({ nullable: false, type: "timestamptz" })
|
||||
public connectDate!: Date;
|
||||
|
||||
@Column({ nullable: true })
|
||||
public user_id!: string;
|
||||
@Column({ nullable: true })
|
||||
public user_id!: string;
|
||||
|
||||
@OneToOne(() => User, (user) => user.id, { onDelete: 'CASCADE', onUpdate: 'CASCADE', nullable: true })
|
||||
@JoinColumn({ name: 'user_id' })
|
||||
public user?: User;
|
||||
@OneToOne(() => User, (user) => user.id, {
|
||||
onDelete: "CASCADE",
|
||||
onUpdate: "CASCADE",
|
||||
nullable: true,
|
||||
})
|
||||
@JoinColumn({ name: "user_id" })
|
||||
public user?: User;
|
||||
|
||||
@OneToMany(() => Payment, (payment) => payment.user)
|
||||
public payments: Payment[];
|
||||
@OneToMany(() => Payment, (payment) => payment.user)
|
||||
public payments: Payment[];
|
||||
}
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';
|
||||
import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";
|
||||
|
||||
@Entity()
|
||||
export class BotSettings {
|
||||
constructor(props?: Partial<BotSettings>) {
|
||||
Object.assign(this, props);
|
||||
}
|
||||
constructor(props?: Partial<BotSettings>) {
|
||||
Object.assign(this, props);
|
||||
}
|
||||
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
public uuid!: string;
|
||||
@PrimaryGeneratedColumn("uuid")
|
||||
public uuid!: string;
|
||||
|
||||
@Column({ type: 'text', array: true })
|
||||
public messageTimes!: string[];
|
||||
@Column({ type: "text", array: true })
|
||||
public messageTimes!: string[];
|
||||
|
||||
@Column()
|
||||
public channel!: string;
|
||||
@Column()
|
||||
public channel!: string;
|
||||
|
||||
@Column({ default: false })
|
||||
public isActive!: boolean;
|
||||
@Column({ default: false })
|
||||
public isActive!: boolean;
|
||||
}
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
import { Column, Entity, PrimaryColumn } from 'typeorm';
|
||||
import { Column, Entity, PrimaryColumn } from "typeorm";
|
||||
|
||||
@Entity()
|
||||
export class User {
|
||||
constructor(props?: Partial<User>) {
|
||||
Object.assign(this, props);
|
||||
}
|
||||
constructor(props?: Partial<User>) {
|
||||
Object.assign(this, props);
|
||||
}
|
||||
|
||||
@PrimaryColumn()
|
||||
public id!: string;
|
||||
@PrimaryColumn()
|
||||
public id!: string;
|
||||
|
||||
@Column({ nullable: true })
|
||||
public user_name: string;
|
||||
@Column({ nullable: true })
|
||||
public user_name: string;
|
||||
|
||||
@Column({ nullable: false , default: false})
|
||||
public banned: boolean;
|
||||
@Column({ nullable: false, default: false })
|
||||
public banned: boolean;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export enum EGetAll {
|
||||
all = 'all',
|
||||
will_post = 'will-post',
|
||||
posted = 'posted',
|
||||
all = "all",
|
||||
will_post = "will-post",
|
||||
posted = "posted",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user