import { BaseEntity } from '../../base/entity/base.js';
import { Column, Entity, Index } from 'typeorm';

/**
 * 集群-Agent 关联（成员关系权威来源）
 */
@Entity('netaclaw_crew_agent')
export class NetaClawCrewAgentEntity extends BaseEntity {
  @Index()
  @Column({ comment: '集群 ID' })
  crewId: number;

  @Index()
  @Column({ comment: 'Agent ID' })
  agentId: number;

  @Column({ comment: '该 Agent 在集群中的角色描述', type: 'text', nullable: true })
  role: string;

  @Column({ type: 'json', comment: '画布位置', nullable: true })
  canvasPosition: { x: number; y: number };

  @Column({ comment: '分组名', length: 100, nullable: true })
  groupName: string;
}
