mirror of
https://github.com/MrSedan/neuro-reply-website.git
synced 2026-01-15 21:19:42 +03:00
23 lines
529 B
TypeScript
23 lines
529 B
TypeScript
import { Column, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn } from "typeorm";
|
|
import { ProxyUser } from "./proxy_user.entity";
|
|
|
|
@Entity()
|
|
export class Payment {
|
|
constructor(props?: Partial<Payment>) {
|
|
Object.assign(this, props);
|
|
}
|
|
|
|
@PrimaryGeneratedColumn("increment")
|
|
public id!: number;
|
|
|
|
@Column()
|
|
public user_uuid!: string;
|
|
|
|
@Column({ type: "timestamptz" })
|
|
public payTime!: Date;
|
|
|
|
@ManyToOne(() => ProxyUser, { onDelete: "CASCADE" })
|
|
@JoinColumn({ name: "user_uuid" })
|
|
user: ProxyUser;
|
|
}
|