AnhLedger's picture
modify payment
e1abcaf
raw
history blame contribute delete
972 Bytes
import {
BaseEntity,
Column,
Entity,
OneToOne,
PrimaryGeneratedColumn,
Relation,
} from 'typeorm';
import { OrderEntity } from './order.entity.js';
@Entity('payments')
export class PaymentEntity extends BaseEntity {
@PrimaryGeneratedColumn()
id: number;
@OneToOne(() => OrderEntity, (a) => a.payment)
order: Relation<OrderEntity>;
@Column({ default: 0 })
payment_method: number;
@Column()
vnp_amount: number
@Column({ nullable: true })
vnp_bank_code: string
@Column({ nullable: true })
vnp_bank_tran_no:string
@Column({ default: 0})
vnp_card_type: number
@Column({ nullable: true })
vnp_order_info: string //Nội dung giao dịch
@Column({ nullable: true })
vnp_paydate: string
@Column({ nullable: true })
vnp_response_code: number
@Column({ nullable: true })
vnp_transaction_no: string
@Column({ nullable: true })
vnp_transaction_status: number
}