mirror of
https://github.com/MrSedan/neuro-reply-website.git
synced 2026-01-14 20:49:42 +03:00
added: proxy module
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { Column, Entity, JoinColumn, OneToOne, PrimaryGeneratedColumn } from 'typeorm';
|
||||
import { Column, Entity, JoinColumn, OneToMany, OneToOne, PrimaryGeneratedColumn } from 'typeorm';
|
||||
import { Payment } from './payment.entity';
|
||||
import { User } from './user.entity';
|
||||
|
||||
@Entity()
|
||||
@@ -10,11 +11,11 @@ export class ProxyUser {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
public uuid!: string;
|
||||
|
||||
@Column({ nullable: true })
|
||||
public userName: string;
|
||||
@Column({ nullable: false, unique: true })
|
||||
public userName!: string;
|
||||
|
||||
@Column({ nullable: true })
|
||||
public description: string;
|
||||
public description?: string;
|
||||
|
||||
@Column({ nullable: false })
|
||||
public link!: string;
|
||||
@@ -27,5 +28,8 @@ export class ProxyUser {
|
||||
|
||||
@OneToOne(() => User, (user) => user.id, { onDelete: 'CASCADE', onUpdate: 'CASCADE', nullable: true })
|
||||
@JoinColumn({ name: 'user_id' })
|
||||
public user: User;
|
||||
public user?: User;
|
||||
|
||||
@OneToMany(() => Payment, (payment) => payment.user)
|
||||
public payments: Payment[];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user