mirror of
https://github.com/MrSedan/neuro-reply-website.git
synced 2026-01-15 04:59:42 +03:00
feat: proxy services
This commit is contained in:
17
backend/libs/database/proxy_info.ts
Normal file
17
backend/libs/database/proxy_info.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";
|
||||
|
||||
@Entity()
|
||||
export class ProxyInfo {
|
||||
constructor(props?: Partial<ProxyInfo>) {
|
||||
Object.assign(this, props);
|
||||
}
|
||||
|
||||
@PrimaryGeneratedColumn("uuid")
|
||||
public uuid!: string;
|
||||
|
||||
@Column()
|
||||
public enabled: boolean;
|
||||
|
||||
@Column()
|
||||
public text: string;
|
||||
}
|
||||
@@ -36,4 +36,7 @@ export class ProxyUser {
|
||||
|
||||
@OneToMany(() => Payment, (payment) => payment.user)
|
||||
public payments: Payment[];
|
||||
|
||||
@Column()
|
||||
public tg_id!: string;
|
||||
}
|
||||
|
||||
@@ -4,13 +4,24 @@ import { Admin } from "./database/admin.entity";
|
||||
import { Image } from "./database/image.entity";
|
||||
import { Payment } from "./database/payment.entity";
|
||||
import { Post } from "./database/post.entity";
|
||||
import { ProxyInfo } from "./database/proxy_info";
|
||||
import { ProxyUser } from "./database/proxy_user.entity";
|
||||
import { BotSettings } from "./database/settings.entity";
|
||||
import { User } from "./database/user.entity";
|
||||
import { WebUser } from "./database/web_user.entity";
|
||||
@Module({
|
||||
imports: [
|
||||
TypeOrmModule.forFeature([User, Admin, Post, Image, Payment, ProxyUser, BotSettings, WebUser]),
|
||||
TypeOrmModule.forFeature([
|
||||
User,
|
||||
Admin,
|
||||
Post,
|
||||
Image,
|
||||
Payment,
|
||||
ProxyUser,
|
||||
BotSettings,
|
||||
WebUser,
|
||||
ProxyInfo,
|
||||
]),
|
||||
],
|
||||
exports: [TypeOrmModule],
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user