mirror of
https://github.com/MrSedan/neuro-reply-website.git
synced 2026-01-14 20:49:42 +03:00
Added settings entity
This commit is contained in:
20
backend/libs/database/settings.entity.ts
Normal file
20
backend/libs/database/settings.entity.ts
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';
|
||||||
|
|
||||||
|
@Entity()
|
||||||
|
export class BotSettings {
|
||||||
|
constructor(props?: Partial<BotSettings>) {
|
||||||
|
Object.assign(this, props);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PrimaryGeneratedColumn('uuid')
|
||||||
|
public uuid!: string;
|
||||||
|
|
||||||
|
@Column({ type: 'text', array: true })
|
||||||
|
public messageTimes!: string[];
|
||||||
|
|
||||||
|
@Column()
|
||||||
|
public channel!: string;
|
||||||
|
|
||||||
|
@Column({ default: false })
|
||||||
|
public isActive!: boolean;
|
||||||
|
}
|
||||||
@@ -1,13 +1,14 @@
|
|||||||
import { Module } from '@nestjs/common';
|
import { Module } from '@nestjs/common';
|
||||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||||
import { User } from './database/user.entity';
|
|
||||||
import { Admin } from './database/admin.entity';
|
import { Admin } from './database/admin.entity';
|
||||||
import { Post } from './database/post.entity';
|
|
||||||
import { Image } from './database/image.entity';
|
import { Image } from './database/image.entity';
|
||||||
import { Payment } from './database/payment.entity';
|
import { Payment } from './database/payment.entity';
|
||||||
|
import { Post } from './database/post.entity';
|
||||||
import { ProxyUser } from './database/proxy_user.entity';
|
import { ProxyUser } from './database/proxy_user.entity';
|
||||||
|
import { BotSettings } from './database/settings.entity';
|
||||||
|
import { User } from './database/user.entity';
|
||||||
@Module({
|
@Module({
|
||||||
imports: [TypeOrmModule.forFeature([User, Admin, Post, Image, Payment, ProxyUser])],
|
imports: [TypeOrmModule.forFeature([User, Admin, Post, Image, Payment, ProxyUser, BotSettings])],
|
||||||
exports: [TypeOrmModule],
|
exports: [TypeOrmModule],
|
||||||
})
|
})
|
||||||
export class LibsModule {}
|
export class LibsModule {}
|
||||||
|
|||||||
Reference in New Issue
Block a user