rwadurian/backend/services/authorization-service/src/domain/value-objects/assessment-config.vo.ts

29 lines
852 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { MonthlyTargetType } from '@/domain/enums'
export class AssessmentConfig {
constructor(
public readonly initialTargetTreeCount: number,
public readonly monthlyTargetType: MonthlyTargetType,
) {}
static forCommunity(): AssessmentConfig {
return new AssessmentConfig(100, MonthlyTargetType.FIXED)
}
static forAuthProvince(): AssessmentConfig {
return new AssessmentConfig(3000, MonthlyTargetType.LADDER)
}
static forProvince(): AssessmentConfig {
return new AssessmentConfig(50000, MonthlyTargetType.LADDER) // 省区域5万棵
}
static forAuthCity(): AssessmentConfig {
return new AssessmentConfig(500, MonthlyTargetType.LADDER)
}
static forCity(): AssessmentConfig {
return new AssessmentConfig(10000, MonthlyTargetType.LADDER) // 市区域1万棵
}
}