new structure whit other database
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import {
|
||||
Entity,
|
||||
PrimaryGeneratedColumn,
|
||||
Column,
|
||||
ManyToOne,
|
||||
JoinColumn,
|
||||
} from 'typeorm';
|
||||
import { Transaccion } from 'src/database/Monedero/entities/transaccion.entity'; // ajusta la ruta según tu estructura
|
||||
|
||||
@Entity('AbonoTicket')
|
||||
export class AbonoTicket {
|
||||
@PrimaryGeneratedColumn({ name: 'idTickect', type: 'int' })
|
||||
idTickect: number;
|
||||
|
||||
@ManyToOne(() => Transaccion, (transaccion) => transaccion.abonos, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn({ name: 'idTransaccion' })
|
||||
transaccion: Transaccion;
|
||||
|
||||
@Column({ type: 'varchar', length: 100 })
|
||||
folio: string;
|
||||
|
||||
@Column({ type: 'int' })
|
||||
monto: number;
|
||||
|
||||
@Column({ type: 'datetime' })
|
||||
fecha: Date;
|
||||
}
|
||||
Reference in New Issue
Block a user