06112602ec
Version the NestJS TDLib gateway with Docker deployment, migrations, automated tests and platform integration documentation while excluding all account sessions, credentials, runtime databases and backups.
37 lines
740 B
TypeScript
37 lines
740 B
TypeScript
import {
|
|
Entity,
|
|
PrimaryGeneratedColumn,
|
|
Column,
|
|
CreateDateColumn,
|
|
ManyToOne,
|
|
JoinColumn,
|
|
} from 'typeorm';
|
|
import { TgAccount } from './tg-account.entity';
|
|
import { TgProxy } from './tg-proxy.entity';
|
|
|
|
@Entity('tg_account_proxy_bindings')
|
|
export class TgAccountProxyBinding {
|
|
@PrimaryGeneratedColumn('uuid')
|
|
id: string;
|
|
|
|
@Column()
|
|
accountId: string;
|
|
|
|
@ManyToOne(() => TgAccount, (account) => account.proxyBindings)
|
|
@JoinColumn({ name: 'accountId' })
|
|
account: TgAccount;
|
|
|
|
@Column()
|
|
proxyId: string;
|
|
|
|
@ManyToOne(() => TgProxy, (proxy) => proxy.accountBindings)
|
|
@JoinColumn({ name: 'proxyId' })
|
|
proxy: TgProxy;
|
|
|
|
@Column({ default: true })
|
|
isActive: boolean;
|
|
|
|
@CreateDateColumn()
|
|
createdAt: Date;
|
|
}
|