mirror of
https://github.com/MrSedan/neuro-reply-website.git
synced 2026-01-14 20:49:42 +03:00
Some changes in entities
This commit is contained in:
@@ -1,22 +1,22 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, JoinColumn } from 'typeorm';
|
import { Column, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn } from 'typeorm';
|
||||||
import { ProxyUser } from './proxy_user.entity';
|
import { ProxyUser } from './proxy_user.entity';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class Payment {
|
export class Payment {
|
||||||
|
constructor(props?: Partial<Payment>) {
|
||||||
|
Object.assign(this, props);
|
||||||
|
}
|
||||||
|
|
||||||
@PrimaryGeneratedColumn('increment')
|
@PrimaryGeneratedColumn('increment')
|
||||||
public id!: number;
|
public id!: number;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
public uuidUser!: string;
|
public user_uuid!: string;
|
||||||
|
|
||||||
@Column({ type: 'timestamptz' })
|
@Column({ type: 'timestamptz' })
|
||||||
public payTime!: Date;
|
public payTime!: Date;
|
||||||
|
|
||||||
@ManyToOne(() => ProxyUser, { onDelete: 'CASCADE' }) // Assuming you want to cascade delete when a user is deleted
|
@ManyToOne(() => ProxyUser, { onDelete: 'CASCADE' })
|
||||||
@JoinColumn({ name: 'uuidUser' })
|
@JoinColumn({ name: 'user_uuid' })
|
||||||
user: ProxyUser;
|
user: ProxyUser;
|
||||||
|
|
||||||
constructor(props?: Partial<Payment>) {
|
|
||||||
Object.assign(this, props);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, OneToOne, JoinColumn } from 'typeorm';
|
import { Column, Entity, JoinColumn, OneToOne, PrimaryGeneratedColumn } from 'typeorm';
|
||||||
import { Admin } from './admin.entity';
|
import { Admin } from './admin.entity';
|
||||||
@Entity()
|
@Entity()
|
||||||
export class Post {
|
export class Post {
|
||||||
@@ -14,10 +14,13 @@ export class Post {
|
|||||||
|
|
||||||
@Column({ nullable: false })
|
@Column({ nullable: false })
|
||||||
from_user_id: string;
|
from_user_id: string;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
text: string;
|
text: string;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
media_group_id: string;
|
media_group_id: string;
|
||||||
|
|
||||||
@Column({ type: 'timestamptz' })
|
@Column({ type: 'timestamptz' })
|
||||||
timestamps: Date;
|
timestamps: Date;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user