[
  {
    "code": "FIN_PROJECT_CONTRACT",
    "name": "财务-项目/合同建档审批",
    "description": "新项目、合同或报价确认后建档；通过后写入 Project，并可附带默认利润分配规则。",
    "targetTables": [
      "Project",
      "ProfitAllocationRule"
    ],
    "fields": [
      {
        "id": "projectCode",
        "label": "项目编号",
        "type": "text",
        "required": true
      },
      {
        "id": "projectName",
        "label": "项目名称",
        "type": "text",
        "required": true
      },
      {
        "id": "projectType",
        "label": "项目类型",
        "type": "single_select",
        "required": true,
        "options": [
          "客户项目",
          "自研产品",
          "电商渠道",
          "AIGC",
          "公共项目",
          "其他"
        ]
      },
      {
        "id": "ownerGroup",
        "label": "所属组/归属账户",
        "type": "text",
        "required": true
      },
      {
        "id": "customer",
        "label": "客户/合作方",
        "type": "text",
        "required": false
      },
      {
        "id": "contractAmount",
        "label": "合同金额",
        "type": "amount",
        "required": false
      },
      {
        "id": "expectedIncomeMonth",
        "label": "预计收入月份",
        "type": "month",
        "required": false
      },
      {
        "id": "defaultAllocationJson",
        "label": "默认利润分配规则JSON",
        "type": "textarea",
        "required": false,
        "help": "可空；复杂项目由财务录入固定金额/百分比规则。"
      },
      {
        "id": "remark",
        "label": "备注",
        "type": "textarea",
        "required": false
      }
    ]
  },
  {
    "code": "FIN_INCOME_RECEIPT",
    "name": "财务-收入/收款确认审批",
    "description": "收入确认和实际收款入口；通过后写入 IncomeItem，并按收款账户生成收入方向 CashFlow。",
    "targetTables": [
      "Project",
      "IncomeItem",
      "CashFlow"
    ],
    "fields": [
      {
        "id": "projectCode",
        "label": "项目编号",
        "type": "text",
        "required": true
      },
      {
        "id": "projectName",
        "label": "项目名称",
        "type": "text",
        "required": true
      },
      {
        "id": "incomeName",
        "label": "收入名称",
        "type": "text",
        "required": true
      },
      {
        "id": "incomeType",
        "label": "收入类型",
        "type": "single_select",
        "required": true,
        "options": [
          "项目款",
          "产品销售",
          "内部结算",
          "其他"
        ]
      },
      {
        "id": "amount",
        "label": "金额",
        "type": "amount",
        "required": true
      },
      {
        "id": "month",
        "label": "归属月份",
        "type": "month",
        "required": true,
        "help": "用于账务归属和月度结算，格式 YYYY-MM"
      },
      {
        "id": "receivedAt",
        "label": "实际收款日期",
        "type": "date",
        "required": false
      },
      {
        "id": "cashAccountName",
        "label": "收款账户",
        "type": "text",
        "required": true
      },
      {
        "id": "invoiceAmount",
        "label": "开票金额",
        "type": "amount",
        "required": false
      },
      {
        "id": "entersProfitDistribution",
        "label": "是否进入利润分配",
        "type": "boolean",
        "required": true
      },
      {
        "id": "remark",
        "label": "备注",
        "type": "textarea",
        "required": false
      }
    ]
  },
  {
    "code": "FIN_EXPENSE_PAYMENT",
    "name": "财务-支出/付款审批",
    "description": "供应商、税费、人工、办公、AI工具等支出入口；通过后写入 ExpenseItem，已付款则生成支出方向 CashFlow。",
    "targetTables": [
      "Project",
      "EquityAccount",
      "ExpenseItem",
      "CashFlow"
    ],
    "fields": [
      {
        "id": "expenseName",
        "label": "支出名称",
        "type": "text",
        "required": true
      },
      {
        "id": "category",
        "label": "支出大类",
        "type": "single_select",
        "required": true,
        "options": [
          "税费",
          "人工",
          "办公",
          "差旅招待",
          "固定资产",
          "AI工具",
          "供应商",
          "网银费用",
          "项目支出",
          "第三方",
          "其他"
        ]
      },
      {
        "id": "ownerType",
        "label": "归属对象",
        "type": "single_select",
        "required": true,
        "options": [
          "项目",
          "公共账户",
          "个人账户",
          "项目组账户",
          "公司主体"
        ]
      },
      {
        "id": "projectCode",
        "label": "关联项目编号",
        "type": "text",
        "required": false
      },
      {
        "id": "projectName",
        "label": "关联项目名称",
        "type": "text",
        "required": false
      },
      {
        "id": "equityAccountName",
        "label": "承担权益账户",
        "type": "text",
        "required": false
      },
      {
        "id": "amount",
        "label": "金额",
        "type": "amount",
        "required": true
      },
      {
        "id": "month",
        "label": "归属月份",
        "type": "month",
        "required": true,
        "help": "用于账务归属和月度结算，格式 YYYY-MM"
      },
      {
        "id": "paidAt",
        "label": "实际支付日期",
        "type": "date",
        "required": false
      },
      {
        "id": "cashAccountName",
        "label": "支付账户",
        "type": "text",
        "required": false
      },
      {
        "id": "handler",
        "label": "经办人",
        "type": "text",
        "required": false
      },
      {
        "id": "invoiceStatus",
        "label": "发票状态",
        "type": "single_select",
        "required": false,
        "options": [
          "无需",
          "待收",
          "已收",
          "异常"
        ]
      },
      {
        "id": "remark",
        "label": "备注",
        "type": "textarea",
        "required": false
      }
    ]
  },
  {
    "code": "FIN_REIMBURSEMENT",
    "name": "财务-报销审批",
    "description": "员工/项目组/公共费用报销入口；通过后写入 ReimbursementOrder、权益账户支出，并在已付款时生成 CashFlow。",
    "targetTables": [
      "ReimbursementOrder",
      "ExpenseItem",
      "CashFlow"
    ],
    "fields": [
      {
        "id": "reimbursementCode",
        "label": "报销单号",
        "type": "text",
        "required": true
      },
      {
        "id": "applicant",
        "label": "报销人",
        "type": "text",
        "required": true
      },
      {
        "id": "equityAccountName",
        "label": "报销归属账户",
        "type": "text",
        "required": true
      },
      {
        "id": "category",
        "label": "费用类别",
        "type": "single_select",
        "required": true,
        "options": [
          "报销",
          "差旅招待",
          "办公",
          "AI工具",
          "供应商",
          "其他"
        ]
      },
      {
        "id": "amount",
        "label": "金额",
        "type": "amount",
        "required": true
      },
      {
        "id": "month",
        "label": "归属月份",
        "type": "month",
        "required": true,
        "help": "用于账务归属和月度结算，格式 YYYY-MM"
      },
      {
        "id": "expectedPaidAt",
        "label": "期望付款日期",
        "type": "date",
        "required": false
      },
      {
        "id": "paidAt",
        "label": "实际付款日期",
        "type": "date",
        "required": false
      },
      {
        "id": "cashAccountName",
        "label": "支付账户",
        "type": "text",
        "required": false
      },
      {
        "id": "projectCode",
        "label": "关联项目编号",
        "type": "text",
        "required": false
      },
      {
        "id": "projectName",
        "label": "关联项目名称",
        "type": "text",
        "required": false
      },
      {
        "id": "remark",
        "label": "备注",
        "type": "textarea",
        "required": false
      }
    ]
  },
  {
    "code": "FIN_INTERNAL_ADJUSTMENT",
    "name": "财务-内部调整审批",
    "description": "权益账户间调整、历史余额修正、非现金内部结转；通过后写入 InternalAdjustment。",
    "targetTables": [
      "EquityAccount",
      "InternalAdjustment"
    ],
    "fields": [
      {
        "id": "targetAccountName",
        "label": "目标权益账户",
        "type": "text",
        "required": true
      },
      {
        "id": "amount",
        "label": "金额",
        "type": "amount",
        "required": true
      },
      {
        "id": "month",
        "label": "归属月份",
        "type": "month",
        "required": true,
        "help": "用于账务归属和月度结算，格式 YYYY-MM"
      },
      {
        "id": "reason",
        "label": "调整原因",
        "type": "textarea",
        "required": true
      },
      {
        "id": "counterpartyAccountName",
        "label": "对方账户/来源账户",
        "type": "text",
        "required": false
      },
      {
        "id": "remark",
        "label": "备注",
        "type": "textarea",
        "required": false
      }
    ]
  },
  {
    "code": "FIN_ALLOCATION_RULE",
    "name": "财务-利润分配规则审批",
    "description": "维护某项目的固定金额/百分比/手动调整分配规则；通过后写入 ProfitAllocationRule。",
    "targetTables": [
      "Project",
      "EquityAccount",
      "ProfitAllocationRule"
    ],
    "fields": [
      {
        "id": "projectCode",
        "label": "项目编号",
        "type": "text",
        "required": true
      },
      {
        "id": "projectName",
        "label": "项目名称",
        "type": "text",
        "required": true
      },
      {
        "id": "targetAccountName",
        "label": "分配对象/权益账户",
        "type": "text",
        "required": true
      },
      {
        "id": "method",
        "label": "分配方式",
        "type": "single_select",
        "required": true,
        "options": [
          "固定金额",
          "百分比",
          "手动调整"
        ]
      },
      {
        "id": "percent",
        "label": "分配比例%",
        "type": "number",
        "required": false
      },
      {
        "id": "fixedAmount",
        "label": "固定金额",
        "type": "amount",
        "required": false
      },
      {
        "id": "manualAmount",
        "label": "手动调整金额",
        "type": "amount",
        "required": false
      },
      {
        "id": "priority",
        "label": "优先级",
        "type": "number",
        "required": true
      },
      {
        "id": "countsAsPublicDisposable",
        "label": "是否计入公共可支配",
        "type": "boolean",
        "required": true
      },
      {
        "id": "effectiveMonth",
        "label": "生效月份",
        "type": "month",
        "required": false
      },
      {
        "id": "remark",
        "label": "备注",
        "type": "textarea",
        "required": false
      }
    ]
  }
]