export const CALC_METHOD_OPTIONS = [
  { label: '固定价格', value: 1 },
  { label: '贴数', value: 2 },
  { label: '克数', value: 3 },
] as const;

export const UNIT_OPTIONS = ['g', 'ml', '剂'] as const;

export const CALC_METHOD_MAP: Record<number, string> = {
  1: '固定价格',
  2: '贴数',
  3: '克数',
};

export type ProcessRuleRow = {
  calc_method?: number;
  created_at?: number | string;
  has_children?: boolean;
  id: number;
  name: string;
  node_type: 'rule';
  pid: number;
  price?: number | string;
  unit?: string;
};

export type ProcessNoteRow = {
  created_at?: number | string;
  id: number;
  name: string;
  node_type: 'note';
  note?: string;
  pid: number;
  real_id: number;
  rule_id?: number;
  volume?: number | null;
};
