import { debug } from "console";

const config: Record<string, any> = {
  nest: {
    port: 8000,
  },
  cors: {
    enabled: true,
  },
  logger: {
    level: 'debug',
  },
  roles: {
    codytang: ['GUEST'],

    v_bmzmzhao: ['SYSTEM_ADMIN'],
    miamgao: ['SYSTEM_ADMIN'],
    benzemazhu: ['PRODUCT'],
    asherzhou: ['PRODUCT'],
    ivyyfchen: ['PRODUCT'],
    haonanli: ['PRODUCT'],
    libearxiong: ['PRODUCT'],
    jasonzxyin: ['PRODUCT'],
    masonqliu: ['PRODUCT'],

    admin: ['SYSTEM_ADMIN'],
    kavenma: ['SYSTEM_ADMIN'],
    clzhu: ['SYSTEM_ADMIN'],
  },
  prisma: {
    log: ['info', 'query', 'warn', 'error'],
    DATABASE_URL: process.env.TASK_DATABASE_URL,
    explicit: true,
  },
  swagger: {
    enabled: true,
    title: 'Nestjs FTW',
    description: 'The nestjs API description',
    version: '1.5',
    path: 'api',
  },
  graphql: {
    playgroundEnabled: true,
    debug: true,
    schemaDestination: './src/schema.graphql',
    sortSchema: true,
  },
  security: {
    expiresIn: '2m',
    refreshIn: '7d',
    bcryptSaltOrRound: 10,
  },
  media: {
    rootDir: '../web/public/upload/',
    address: 'http://127.0.0.1:3000/upload/',
    maxSize: 1024 * 1024 * 10,
  },
};

export default () => config;
