import { registerAs } from '@nestjs/config';

export default registerAs('storage', () => ({
  driver: process.env.STORAGE_DRIVER || 'local',
  localPath: process.env.STORAGE_LOCAL_PATH || './uploads',
  cos: {
    secretId: process.env.STORAGE_COS_SECRET_ID || '',
    secretKey: process.env.STORAGE_COS_SECRET_KEY || '',
    bucket: process.env.STORAGE_COS_BUCKET || 'zhixi-1259685406',
    region: process.env.STORAGE_COS_REGION || 'ap-beijing',
    domain: process.env.STORAGE_COS_DOMAIN || '',
  },
  s3: {
    bucket: process.env.STORAGE_S3_BUCKET,
    region: process.env.STORAGE_S3_REGION,
    endpoint: process.env.STORAGE_S3_ENDPOINT,
  },
}));
