/**
 * 业务模块路由配置
 * 
 * 注意：本项目使用动态路由，路由配置存储在后端数据库中。
 * 此文件作为路由配置的参考文档，实际路由由后端菜单配置生成。
 * 
 * 菜单配置说明：
 * - menuType: 1=目录, 2=菜单, 3=按钮
 * - component: 对应 views 目录下的组件路径（不含 .vue 后缀）
 * - permission: 权限标识，用于按钮级别权限控制
 * - path: 路由路径
 */

import type { RouteRecordRaw } from 'vue-router'
import Layout from '@/layout/index.vue'

/**
 * 用户管理模块路由配置参考
 * 
 * 后端菜单配置示例：
 * 
 * 1. 用户管理（目录）
 *    - name: 用户管理
 *    - path: /business/user
 *    - menuType: 1 (目录)
 *    - icon: User
 *    - sortOrder: 1
 * 
 * 2. 用户列表（菜单）
 *    - name: 用户列表
 *    - path: /business/user/list
 *    - component: business/user/index
 *    - menuType: 2 (菜单)
 *    - permission: user:list
 *    - sortOrder: 1
 * 
 * 3. 用户盈亏统计（菜单）
 *    - name: 用户盈亏统计
 *    - path: /business/user/profit-loss
 *    - component: business/user/profit-loss
 *    - menuType: 2 (菜单)
 *    - permission: user:profit-loss
 *    - sortOrder: 2
 * 
 * 4. VIP等级管理（菜单）
 *    - name: VIP等级管理
 *    - path: /business/user/vip
 *    - component: business/user/vip
 *    - menuType: 2 (菜单)
 *    - permission: user:vip
 *    - sortOrder: 3
 * 
 * 5. 用户邀请统计（菜单）
 *    - name: 用户邀请统计
 *    - path: /business/user/invite-stats
 *    - component: business/user/invite-stats
 *    - menuType: 2 (菜单)
 *    - permission: user:invite-stats
 *    - sortOrder: 4
 * 
 * 6. 用户登录统计（菜单）
 *    - name: 用户登录统计
 *    - path: /business/user/login-stats
 *    - component: business/user/login-stats
 *    - menuType: 2 (菜单)
 *    - permission: user:login-stats
 *    - sortOrder: 5
 */

/**
 * 业务模块静态路由定义（仅作参考）
 * 实际路由由 permission store 从后端动态生成
 */
export const businessRoutes: RouteRecordRaw[] = [
  {
    path: '/business',
    component: Layout,
    redirect: '/business/user/list',
    meta: {
      title: '业务管理',
      icon: 'Briefcase'
    },
    children: [
      // 用户管理
      {
        path: 'user',
        redirect: '/business/user/list',
        meta: {
          title: '用户管理',
          icon: 'User'
        },
        children: [
          {
            path: 'list',
            name: 'UserList',
            component: () => import('@/views/business/user/index.vue'),
            meta: {
              title: '用户列表',
              permission: 'user:list',
              keepAlive: true
            }
          },
          {
            path: 'profit-loss',
            name: 'UserProfitLoss',
            component: () => import('@/views/business/user/profit-loss.vue'),
            meta: {
              title: '用户盈亏统计',
              permission: 'user:profit-loss',
              keepAlive: true
            }
          },
          {
            path: 'vip',
            name: 'VipManagement',
            component: () => import('@/views/business/user/vip.vue'),
            meta: {
              title: 'VIP等级管理',
              permission: 'user:vip',
              keepAlive: true
            }
          },
          {
            path: 'invite-stats',
            name: 'InviteStats',
            component: () => import('@/views/business/user/invite-stats.vue'),
            meta: {
              title: '用户邀请统计',
              permission: 'user:invite-stats',
              keepAlive: true
            }
          },
          {
            path: 'login-stats',
            name: 'LoginStats',
            component: () => import('@/views/business/user/login-stats.vue'),
            meta: {
              title: '用户登录统计',
              permission: 'user:login-stats',
              keepAlive: true
            }
          }
        ]
      },
      // 商品管理
      {
        path: 'goods',
        redirect: '/business/goods/list',
        meta: {
          title: '商品管理',
          icon: 'Goods'
        },
        children: [
          {
            path: 'list',
            name: 'GoodsList',
            component: () => import('@/views/business/goods/index.vue'),
            meta: {
              title: '盒子管理',
              permission: 'goods:list',
              keepAlive: true
            }
          },
          {
            path: 'type',
            name: 'GoodsType',
            component: () => import('@/views/business/goods/type.vue'),
            meta: {
              title: '盒子类型管理',
              permission: 'goods:type',
              keepAlive: true
            }
          },
          {
            path: 'prize-level',
            name: 'PrizeLevel',
            component: () => import('@/views/business/goods/prize-level.vue'),
            meta: {
              title: '奖品等级设置',
              permission: 'goods:prize-level',
              keepAlive: true
            }
          }
        ]
      },
      // 订单管理
      {
        path: 'order',
        redirect: '/business/order/buy',
        meta: {
          title: '订单管理',
          icon: 'Document'
        },
        children: [
          {
            path: 'buy',
            name: 'BuyOrder',
            component: () => import('@/views/business/order/buy.vue'),
            meta: {
              title: '购买订单',
              permission: 'order:list',
              keepAlive: true
            }
          },
          {
            path: 'shipping',
            name: 'ShippingOrder',
            component: () => import('@/views/business/order/shipping.vue'),
            meta: {
              title: '发货订单',
              permission: 'order:list',
              keepAlive: true
            }
          },
          {
            path: 'recovery',
            name: 'RecoveryOrder',
            component: () => import('@/views/business/order/recovery.vue'),
            meta: {
              title: '回收订单',
              permission: 'order:list',
              keepAlive: true
            }
          },
          {
            path: 'stuck',
            name: 'StuckOrder',
            component: () => import('@/views/business/order/stuck.vue'),
            meta: {
              title: '卡单订单',
              permission: 'order:list',
              keepAlive: true
            }
          },
          {
            path: 'list',
            name: 'OrderList',
            component: () => import('@/views/business/order/list.vue'),
            meta: {
              title: '综合订单',
              permission: 'order:list',
              keepAlive: true
            }
          }
        ]
      },
      // 钻石商城
      {
        path: 'diamond',
        redirect: '/business/diamond/list',
        meta: {
          title: '钻石商城',
          icon: 'Money'
        },
        children: [
          {
            path: 'list',
            name: 'DiamondList',
            component: () => import('@/views/business/diamond/list.vue'),
            meta: {
              title: '钻石商品',
              permission: 'diamond:list',
              keepAlive: true
            }
          }
        ]
      },
      // 营销活动
      {
        path: 'coupon',
        redirect: '/business/coupon/list',
        meta: {
          title: '优惠券管理',
          icon: 'Ticket'
        },
        children: [
          {
            path: 'list',
            name: 'CouponList',
            component: () => import('@/views/business/coupon/list.vue'),
            meta: {
              title: '优惠券列表',
              permission: 'coupon:list',
              keepAlive: true
            }
          },
          {
            path: 'receive',
            name: 'CouponReceive',
            component: () => import('@/views/business/coupon/receive.vue'),
            meta: {
              title: '领取记录',
              permission: 'coupon:list',
              keepAlive: true
            }
          }
        ]
      },
      // 广告管理
      {
        path: 'advert',
        redirect: '/business/advert/list',
        meta: {
          title: '广告管理',
          icon: 'Picture'
        },
        children: [
          {
            path: 'list',
            name: 'AdvertList',
            component: () => import('@/views/business/advert/list.vue'),
            meta: {
              title: '广告列表',
              permission: 'advert:list',
              keepAlive: true
            }
          }
        ]
      },
      // 排行榜管理
      {
        path: 'rank',
        redirect: '/business/rank/week',
        meta: {
          title: '排行榜管理',
          icon: 'Trophy'
        },
        children: [
          {
            path: 'week',
            name: 'RankWeek',
            component: () => import('@/views/business/rank/week.vue'),
            meta: {
              title: '周榜奖品',
              permission: 'rank:list',
              keepAlive: true
            }
          },
          {
            path: 'week-log',
            name: 'RankWeekLog',
            component: () => import('@/views/business/rank/week-log.vue'),
            meta: {
              title: '周榜中奖记录',
              permission: 'rank:list',
              keepAlive: true
            }
          },
          {
            path: 'month',
            name: 'RankMonth',
            component: () => import('@/views/business/rank/month.vue'),
            meta: {
              title: '月榜奖品',
              permission: 'rank:list',
              keepAlive: true
            }
          },
          {
            path: 'month-log',
            name: 'RankMonthLog',
            component: () => import('@/views/business/rank/month-log.vue'),
            meta: {
              title: '月榜中奖记录',
              permission: 'rank:list',
              keepAlive: true
            }
          },
          {
            path: 'user',
            name: 'RankUser',
            component: () => import('@/views/business/rank/user.vue'),
            meta: {
              title: '用户排行榜',
              permission: 'rank:list',
              keepAlive: true
            }
          }
        ]
      },
      // 系统配置
      {
        path: 'config',
        redirect: '/business/config/base',
        meta: {
          title: '系统配置',
          icon: 'Setting'
        },
        children: [
          {
            path: 'base',
            name: 'ConfigBase',
            component: () => import('@/views/business/config/base.vue'),
            meta: {
              title: '基础设置',
              permission: 'config:view',
              keepAlive: true
            }
          },
          {
            path: 'weixinpay',
            name: 'ConfigWeixinpay',
            component: () => import('@/views/business/config/weixinpay.vue'),
            meta: {
              title: '微信支付配置',
              permission: 'config:view',
              keepAlive: true
            }
          },
          {
            path: 'alipay',
            name: 'ConfigAlipay',
            component: () => import('@/views/business/config/alipay.vue'),
            meta: {
              title: '支付宝配置',
              permission: 'config:view',
              keepAlive: true
            }
          },
          {
            path: 'miniprogram',
            name: 'ConfigMiniprogram',
            component: () => import('@/views/business/config/miniprogram.vue'),
            meta: {
              title: '小程序配置',
              permission: 'config:view',
              keepAlive: true
            }
          },
          {
            path: 'h5',
            name: 'ConfigH5',
            component: () => import('@/views/business/config/h5.vue'),
            meta: {
              title: 'H5配置',
              permission: 'config:view',
              keepAlive: true
            }
          },
          {
            path: 'uploads',
            name: 'ConfigUploads',
            component: () => import('@/views/business/config/uploads.vue'),
            meta: {
              title: '上传配置',
              permission: 'config:view',
              keepAlive: true
            }
          },
          {
            path: 'sign',
            name: 'ConfigSign',
            component: () => import('@/views/business/config/sign.vue'),
            meta: {
              title: '签到配置',
              permission: 'config:view',
              keepAlive: true
            }
          },
          {
            path: 'system',
            name: 'ConfigSystem',
            component: () => import('@/views/business/config/system.vue'),
            meta: {
              title: '系统设置',
              permission: 'config:view',
              keepAlive: true
            }
          }
        ]
      },
      // 内容管理
      {
        path: 'content',
        redirect: '/business/danye/list',
        meta: {
          title: '内容管理',
          icon: 'Document'
        },
        children: [
          {
            path: '/business/danye/list',
            name: 'DanyeList',
            component: () => import('@/views/business/danye/list.vue'),
            meta: {
              title: '单页管理',
              permission: 'danye:list',
              keepAlive: true
            }
          },
          {
            path: '/business/floatball/list',
            name: 'FloatBallList',
            component: () => import('@/views/business/floatball/list.vue'),
            meta: {
              title: '悬浮球配置',
              permission: 'floatball:list',
              keepAlive: true
            }
          },
          {
            path: '/business/welfarehouse/list',
            name: 'WelfareHouseList',
            component: () => import('@/views/business/welfarehouse/list.vue'),
            meta: {
              title: '福利屋入口',
              permission: 'welfarehouse:list',
              keepAlive: true
            }
          },
          {
            path: '/business/announcement/list',
            name: 'AnnouncementList',
            component: () => import('@/views/business/announcement/index.vue'),
            meta: {
              title: '中奖公告管理',
              permission: 'announcement:list',
              keepAlive: true
            }
          }
        ]
      },
      // 福利与任务
      {
        path: 'welfare',
        redirect: '/business/reward/list',
        meta: {
          title: '福利与任务',
          icon: 'Present'
        },
        children: [
          {
            path: '/business/reward/list',
            name: 'RewardList',
            component: () => import('@/views/business/reward/list.vue'),
            meta: {
              title: '奖励管理',
              permission: 'reward:list',
              keepAlive: true
            }
          },
          {
            path: '/business/signconfig/list',
            name: 'SignConfigList',
            component: () => import('@/views/business/signconfig/list.vue'),
            meta: {
              title: '签到配置',
              permission: 'signconfig:list',
              keepAlive: true
            }
          },
          {
            path: '/business/task/list',
            name: 'TaskList',
            component: () => import('@/views/business/task/list.vue'),
            meta: {
              title: '任务管理',
              permission: 'task:list',
              keepAlive: true
            }
          },
          {
            path: '/business/qylevel/list',
            name: 'QyLevelList',
            component: () => import('@/views/business/qylevel/list.vue'),
            meta: {
              title: '权益等级',
              permission: 'qylevel:list',
              keepAlive: true
            }
          }
        ]
      },
      // 统计报表
      {
        path: 'statistics',
        redirect: '/business/statistics/data-stand',
        meta: {
          title: '统计报表',
          icon: 'DataAnalysis'
        },
        children: [
          {
            path: 'data-stand',
            name: 'DataStand',
            component: () => import('@/views/business/statistics/data-stand.vue'),
            meta: {
              title: '数据看板',
              permission: 'statistics:data-stand',
              keepAlive: true
            }
          },
          {
            path: 'box-profit',
            name: 'BoxProfit',
            component: () => import('@/views/business/statistics/box-profit.vue'),
            meta: {
              title: '盒子利润统计',
              permission: 'statistics:box-profit',
              keepAlive: true
            }
          }
        ]
      }
    ]
  }
]

/**
 * 用户管理模块权限配置
 * 用于按钮级别权限控制
 */
export const userPermissions = {
  // 用户列表
  list: 'user:list',
  view: 'user:view',
  edit: 'user:edit',
  
  // 资金操作
  moneyChange: 'user:money-change',
  
  // 状态管理
  ban: 'user:ban',
  unban: 'user:unban',
  setTest: 'user:set-test',
  clearMobile: 'user:clear-mobile',
  clearWechat: 'user:clear-wechat',
  bindMobile: 'user:bind-mobile',
  
  // 赠送功能
  giftCoupon: 'user:gift-coupon',
  giftCard: 'user:gift-card',
  
  // 统计页面
  profitLoss: 'user:profit-loss',
  vip: 'user:vip',
  inviteStats: 'user:invite-stats',
  loginStats: 'user:login-stats',
  
  // 导出功能
  export: 'user:export'
}

/**
 * 商品管理模块路由配置参考
 * 
 * 后端菜单配置示例：
 * 
 * 1. 商品管理（目录）
 *    - name: 商品管理
 *    - path: /business/goods
 *    - menuType: 1 (目录)
 *    - icon: Goods
 *    - sortOrder: 2
 * 
 * 2. 盒子管理（菜单）
 *    - name: 盒子管理
 *    - path: /business/goods/list
 *    - component: business/goods/index
 *    - menuType: 2 (菜单)
 *    - permission: goods:list
 *    - sortOrder: 1
 * 
 * 3. 盒子类型管理（菜单）
 *    - name: 盒子类型管理
 *    - path: /business/goods/type
 *    - component: business/goods/type
 *    - menuType: 2 (菜单)
 *    - permission: goods:type
 *    - sortOrder: 2
 */

/**
 * 商品管理模块权限配置
 * 用于按钮级别权限控制
 */
export const goodsPermissions = {
  // 盒子列表
  list: 'goods:list',
  view: 'goods:view',
  create: 'goods:create',
  edit: 'goods:edit',
  delete: 'goods:delete',
  
  // 盒子操作
  copy: 'goods:copy',
  clearLottery: 'goods:clear-lottery',
  extend: 'goods:extend',
  
  // 奖品管理
  prizeList: 'goods:prize-list',
  prizeCreate: 'goods:prize-create',
  prizeEdit: 'goods:prize-edit',
  prizeDelete: 'goods:prize-delete',
  
  // 类型管理
  type: 'goods:type',
  typeCreate: 'goods:type-create',
  typeEdit: 'goods:type-edit',
  typeDelete: 'goods:type-delete'
}

/**
 * 订单管理模块路由配置参考
 * 
 * 后端菜单配置示例：
 * 
 * 1. 订单管理（目录）
 *    - name: 订单管理
 *    - path: /business/order
 *    - menuType: 1 (目录)
 *    - icon: Document
 *    - sortOrder: 3
 * 
 * 2. 购买订单（菜单）
 *    - name: 购买订单
 *    - path: /business/order/buy
 *    - component: business/order/buy
 *    - menuType: 2 (菜单)
 *    - permission: order:list
 *    - sortOrder: 1
 * 
 * 3. 发货订单（菜单）
 *    - name: 发货订单
 *    - path: /business/order/shipping
 *    - component: business/order/shipping
 *    - menuType: 2 (菜单)
 *    - permission: order:list
 *    - sortOrder: 2
 * 
 * 4. 回收订单（菜单）
 *    - name: 回收订单
 *    - path: /business/order/recovery
 *    - component: business/order/recovery
 *    - menuType: 2 (菜单)
 *    - permission: order:list
 *    - sortOrder: 3
 * 
 * 5. 卡单订单（菜单）
 *    - name: 卡单订单
 *    - path: /business/order/stuck
 *    - component: business/order/stuck
 *    - menuType: 2 (菜单)
 *    - permission: order:list
 *    - sortOrder: 4
 * 
 * 6. 综合订单（菜单）
 *    - name: 综合订单
 *    - path: /business/order/list
 *    - component: business/order/list
 *    - menuType: 2 (菜单)
 *    - permission: order:list
 *    - sortOrder: 5
 */

/**
 * 订单管理模块权限配置
 * 用于按钮级别权限控制
 */
export const orderPermissions = {
  // 订单列表
  list: 'order:list',
  view: 'order:view',
  
  // 发货操作
  ship: 'order:ship',
  cancelShip: 'order:cancel-ship',
  
  // 导出功能
  export: 'order:export'
}

/**
 * 钻石商城模块路由配置参考
 * 
 * 后端菜单配置示例：
 * 
 * 1. 钻石商城（目录）
 *    - name: 钻石商城
 *    - path: /business/diamond
 *    - menuType: 1 (目录)
 *    - icon: Money
 *    - sortOrder: 50
 * 
 * 2. 钻石商品（菜单）
 *    - name: 钻石商品
 *    - path: /business/diamond/list
 *    - component: business/diamond/list
 *    - menuType: 2 (菜单)
 *    - permission: diamond:list
 *    - sortOrder: 1
 */

/**
 * 钻石商城模块权限配置
 * 用于按钮级别权限控制
 */
export const diamondPermissions = {
  // 钻石商品列表
  list: 'diamond:list',
  
  // 钻石商品操作
  add: 'diamond:add',
  edit: 'diamond:edit',
  delete: 'diamond:delete'
}

/**
 * 系统配置模块路由配置参考
 * 
 * 后端菜单配置示例：
 * 
 * 1. 系统配置（目录）
 *    - name: 系统配置
 *    - path: /business/config
 *    - menuType: 1 (目录)
 *    - icon: Setting
 *    - sortOrder: 60
 * 
 * 2. 基础设置（菜单）
 *    - name: 基础设置
 *    - path: /business/config/base
 *    - component: business/config/base
 *    - menuType: 2 (菜单)
 *    - permission: config:view
 *    - sortOrder: 1
 * 
 * 3. 微信支付配置（菜单）
 *    - name: 微信支付配置
 *    - path: /business/config/weixinpay
 *    - component: business/config/weixinpay
 *    - menuType: 2 (菜单)
 *    - permission: config:view
 *    - sortOrder: 2
 * 
 * 4. 支付宝配置（菜单）
 *    - name: 支付宝配置
 *    - path: /business/config/alipay
 *    - component: business/config/alipay
 *    - menuType: 2 (菜单)
 *    - permission: config:view
 *    - sortOrder: 3
 * 
 * 5. 小程序配置（菜单）
 *    - name: 小程序配置
 *    - path: /business/config/miniprogram
 *    - component: business/config/miniprogram
 *    - menuType: 2 (菜单)
 *    - permission: config:view
 *    - sortOrder: 4
 * 
 * 6. H5配置（菜单）
 *    - name: H5配置
 *    - path: /business/config/h5
 *    - component: business/config/h5
 *    - menuType: 2 (菜单)
 *    - permission: config:view
 *    - sortOrder: 5
 * 
 * 7. 上传配置（菜单）
 *    - name: 上传配置
 *    - path: /business/config/uploads
 *    - component: business/config/uploads
 *    - menuType: 2 (菜单)
 *    - permission: config:view
 *    - sortOrder: 6
 * 
 * 8. 签到配置（菜单）
 *    - name: 签到配置
 *    - path: /business/config/sign
 *    - component: business/config/sign
 *    - menuType: 2 (菜单)
 *    - permission: config:view
 *    - sortOrder: 7
 * 
 * 9. 系统设置（菜单）
 *    - name: 系统设置
 *    - path: /business/config/system
 *    - component: business/config/system
 *    - menuType: 2 (菜单)
 *    - permission: config:view
 *    - sortOrder: 8
 */

/**
 * 系统配置模块权限配置
 * 用于按钮级别权限控制
 */
export const configPermissions = {
  // 配置查看
  view: 'config:view',
  
  // 配置编辑
  edit: 'config:edit'
}

/**
 * 营销活动模块路由配置参考
 * 
 * 后端菜单配置示例：
 * 
 * 1. 优惠券管理（目录）
 *    - name: 优惠券管理
 *    - path: /business/coupon
 *    - menuType: 1 (目录)
 *    - icon: Ticket
 *    - sortOrder: 30
 * 
 * 2. 优惠券列表（菜单）
 *    - name: 优惠券列表
 *    - path: /business/coupon/list
 *    - component: business/coupon/list
 *    - menuType: 2 (菜单)
 *    - permission: coupon:list
 *    - sortOrder: 1
 * 
 * 3. 领取记录（菜单）
 *    - name: 领取记录
 *    - path: /business/coupon/receive
 *    - component: business/coupon/receive
 *    - menuType: 2 (菜单)
 *    - permission: coupon:list
 *    - sortOrder: 2
 * 
 * 4. 广告管理（目录）
 *    - name: 广告管理
 *    - path: /business/advert
 *    - menuType: 1 (目录)
 *    - icon: Picture
 *    - sortOrder: 35
 * 
 * 5. 广告列表（菜单）
 *    - name: 广告列表
 *    - path: /business/advert/list
 *    - component: business/advert/list
 *    - menuType: 2 (菜单)
 *    - permission: advert:list
 *    - sortOrder: 1
 * 
 * 6. 排行榜管理（目录）
 *    - name: 排行榜管理
 *    - path: /business/rank
 *    - menuType: 1 (目录)
 *    - icon: Trophy
 *    - sortOrder: 40
 * 
 * 7. 周榜奖品（菜单）
 *    - name: 周榜奖品
 *    - path: /business/rank/week
 *    - component: business/rank/week
 *    - menuType: 2 (菜单)
 *    - permission: rank:list
 *    - sortOrder: 1
 * 
 * 8. 周榜中奖记录（菜单）
 *    - name: 周榜中奖记录
 *    - path: /business/rank/week-log
 *    - component: business/rank/week-log
 *    - menuType: 2 (菜单)
 *    - permission: rank:list
 *    - sortOrder: 2
 * 
 * 9. 月榜奖品（菜单）
 *    - name: 月榜奖品
 *    - path: /business/rank/month
 *    - component: business/rank/month
 *    - menuType: 2 (菜单)
 *    - permission: rank:list
 *    - sortOrder: 3
 * 
 * 10. 月榜中奖记录（菜单）
 *    - name: 月榜中奖记录
 *    - path: /business/rank/month-log
 *    - component: business/rank/month-log
 *    - menuType: 2 (菜单)
 *    - permission: rank:list
 *    - sortOrder: 4
 * 
 * 11. 用户排行榜（菜单）
 *    - name: 用户排行榜
 *    - path: /business/rank/user
 *    - component: business/rank/user
 *    - menuType: 2 (菜单)
 *    - permission: rank:list
 *    - sortOrder: 5
 */

/**
 * 优惠券管理模块权限配置
 * 用于按钮级别权限控制
 */
export const couponPermissions = {
  // 优惠券列表
  list: 'coupon:list',
  
  // 优惠券操作
  add: 'coupon:add',
  edit: 'coupon:edit',
  delete: 'coupon:delete'
}

/**
 * 广告管理模块权限配置
 * 用于按钮级别权限控制
 */
export const advertPermissions = {
  // 广告列表
  list: 'advert:list',
  
  // 广告操作
  add: 'advert:add',
  edit: 'advert:edit',
  delete: 'advert:delete'
}

/**
 * 排行榜管理模块权限配置
 * 用于按钮级别权限控制
 */
export const rankPermissions = {
  // 排行榜列表
  list: 'rank:list',
  
  // 排行榜操作
  add: 'rank:add',
  edit: 'rank:edit',
  delete: 'rank:delete'
}

/**
 * 内容管理模块路由配置参考
 * 
 * 后端菜单配置示例：
 * 
 * 1. 内容管理（目录）
 *    - name: 内容管理
 *    - path: /business/content
 *    - menuType: 1 (目录)
 *    - icon: Document
 *    - sortOrder: 70
 * 
 * 2. 单页管理（菜单）
 *    - name: 单页管理
 *    - path: /business/danye/list
 *    - component: business/danye/list
 *    - menuType: 2 (菜单)
 *    - permission: danye:list
 *    - sortOrder: 1
 * 
 * 3. 悬浮球配置（菜单）
 *    - name: 悬浮球配置
 *    - path: /business/floatball/list
 *    - component: business/floatball/list
 *    - menuType: 2 (菜单)
 *    - permission: floatball:list
 *    - sortOrder: 2
 * 
 * 4. 福利屋入口（菜单）
 *    - name: 福利屋入口
 *    - path: /business/welfarehouse/list
 *    - component: business/welfarehouse/list
 *    - menuType: 2 (菜单)
 *    - permission: welfarehouse:list
 *    - sortOrder: 3
 * 
 * 5. 中奖公告管理（菜单）
 *    - name: 中奖公告管理
 *    - path: /business/announcement/list
 *    - component: business/announcement/index
 *    - menuType: 2 (菜单)
 *    - permission: announcement:list
 *    - sortOrder: 4
 */

/**
 * 内容管理模块权限配置
 * 用于按钮级别权限控制
 */
export const contentPermissions = {
  // 单页管理
  danyeList: 'danye:list',
  danyeEdit: 'danye:edit',
  
  // 悬浮球配置
  floatballList: 'floatball:list',
  floatballAdd: 'floatball:add',
  floatballEdit: 'floatball:edit',
  floatballDelete: 'floatball:delete',
  
  // 福利屋入口
  welfareHouseList: 'welfarehouse:list',
  welfareHouseAdd: 'welfarehouse:add',
  welfareHouseEdit: 'welfarehouse:edit',
  welfareHouseDelete: 'welfarehouse:delete',
  
  // 中奖公告管理
  announcementList: 'announcement:list',
  announcementAdd: 'announcement:add',
  announcementEdit: 'announcement:edit',
  announcementDelete: 'announcement:delete',
  announcementStatus: 'announcement:status'
}

/**
 * 福利与任务模块路由配置参考
 * 
 * 后端菜单配置示例：
 * 
 * 1. 福利与任务（目录）
 *    - name: 福利与任务
 *    - path: /business/welfare
 *    - menuType: 1 (目录)
 *    - icon: Present
 *    - sortOrder: 80
 * 
 * 2. 奖励管理（菜单）
 *    - name: 奖励管理
 *    - path: /business/reward/list
 *    - component: business/reward/list
 *    - menuType: 2 (菜单)
 *    - permission: reward:list
 *    - sortOrder: 1
 * 
 * 3. 签到配置（菜单）
 *    - name: 签到配置
 *    - path: /business/signconfig/list
 *    - component: business/signconfig/list
 *    - menuType: 2 (菜单)
 *    - permission: signconfig:list
 *    - sortOrder: 2
 * 
 * 4. 任务管理（菜单）
 *    - name: 任务管理
 *    - path: /business/task/list
 *    - component: business/task/list
 *    - menuType: 2 (菜单)
 *    - permission: task:list
 *    - sortOrder: 3
 * 
 * 5. 权益等级（菜单）
 *    - name: 权益等级
 *    - path: /business/qylevel/list
 *    - component: business/qylevel/list
 *    - menuType: 2 (菜单)
 *    - permission: qylevel:list
 *    - sortOrder: 4
 */

/**
 * 福利与任务模块权限配置
 * 用于按钮级别权限控制
 */
export const welfareTaskPermissions = {
  // 奖励管理
  rewardList: 'reward:list',
  rewardAdd: 'reward:add',
  rewardEdit: 'reward:edit',
  rewardDelete: 'reward:delete',
  rewardStatus: 'reward:status',
  
  // 签到配置
  signConfigList: 'signconfig:list',
  signConfigAdd: 'signconfig:add',
  signConfigEdit: 'signconfig:edit',
  signConfigDelete: 'signconfig:delete',
  signConfigStatus: 'signconfig:status',
  signConfigSort: 'signconfig:sort',
  signConfigReward: 'signconfig:reward',
  
  // 任务管理
  taskList: 'task:list',
  taskAdd: 'task:add',
  taskEdit: 'task:edit',
  taskDelete: 'task:delete',
  
  // 权益等级
  qyLevelList: 'qylevel:list',
  qyLevelEdit: 'qylevel:edit',
  qyLevelPrizeList: 'qylevel:prize-list',
  qyLevelPrizeAdd: 'qylevel:prize-add',
  qyLevelPrizeEdit: 'qylevel:prize-edit',
  qyLevelPrizeDelete: 'qylevel:prize-delete'
}

/**
 * 统计报表模块路由配置参考
 * 
 * 后端菜单配置示例：
 * 
 * 1. 统计报表（目录）
 *    - name: 统计报表
 *    - path: /business/statistics
 *    - menuType: 1 (目录)
 *    - icon: DataAnalysis
 *    - sortOrder: 5
 * 
 * 2. 数据看板（菜单）
 *    - name: 数据看板
 *    - path: /business/statistics/data-stand
 *    - component: business/statistics/data-stand
 *    - menuType: 2 (菜单)
 *    - permission: statistics:data-stand
 *    - sortOrder: 1
 */

/**
 * 统计报表模块权限配置
 * 用于按钮级别权限控制
 */
export const statisticsPermissions = {
  // 数据看板
  dataStand: 'statistics:data-stand',
  // 盒子利润统计
  boxProfit: 'statistics:box-profit'
}

export default businessRoutes
