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

@Entity('ssh_configs')
export class SshConfig {
  @PrimaryGeneratedColumn('uuid')
  id!: string;

  @Column({ type: 'varchar', length: 20 })
  tenantId!: string;

  @Column({ type: 'uuid' })
  serverId!: string;

  @Column({ type: 'uuid', nullable: true })
  proxyJumpServerId?: string;

  @Column({ type: 'boolean', default: true })
  strictHostKeyChecking!: boolean;

  @Column({ type: 'int', default: 60 })
  serverAliveInterval!: number;

  @Column({ type: 'jsonb', default: {} })
  customOptions!: Record<string, string>;

  @CreateDateColumn({ type: 'timestamptz' })
  createdAt!: Date;

  @UpdateDateColumn({ type: 'timestamptz' })
  updatedAt!: Date;
}
