import { Entity, Column, PrimaryGeneratedColumn, CreateDateColumn } from 'typeorm';

@Entity('travel_rule_records')
export class TravelRuleRecord {
  @PrimaryGeneratedColumn('uuid') id: string;
  @Column({ name: 'transaction_id', type: 'uuid' }) transactionId: string;
  @Column({ name: 'sender_id', type: 'uuid' }) senderId: string;
  @Column({ name: 'receiver_id', type: 'uuid' }) receiverId: string;
  @Column({ type: 'numeric', precision: 20, scale: 8 }) amount: string;
  @Column({ name: 'sender_name', type: 'varchar', length: 200, nullable: true }) senderName: string | null;
  @Column({ name: 'receiver_name', type: 'varchar', length: 200, nullable: true }) receiverName: string | null;
  @Column({ name: 'sender_kyc_level', type: 'smallint' }) senderKycLevel: number;
  @Column({ name: 'receiver_kyc_level', type: 'smallint' }) receiverKycLevel: number;
  @Column({ type: 'varchar', length: 20, default: 'pending' }) status: string;
  @CreateDateColumn({ name: 'created_at', type: 'timestamptz' }) createdAt: Date;
}
