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

/**
 * For SPECIFIC_TENANTS target type — lists which tenants should receive the notification.
 */
@Entity({ name: 'notification_tenant_targets', schema: 'public' })
export class NotificationTenantTarget {
  @PrimaryGeneratedColumn('uuid')
  id!: string;

  @Column({ name: 'notification_id', type: 'uuid' })
  @Index()
  notificationId!: string;

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