mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-22 07:10:53 +00:00
refactor: Update ProjectTestService to allow generating random projects with seat limit
This commit is contained in:
parent
bc15416103
commit
7e54fc33ae
@ -3,7 +3,7 @@ import Project from "Common/Models/DatabaseModels/Project";
|
||||
import { PlanType } from "../../../../Types/Billing/SubscriptionPlan";
|
||||
|
||||
export default class ProjectTestService {
|
||||
public static generateRandomProject(data: { seatLimit?: number }): Project {
|
||||
public static generateRandomProject(data?: { seatLimit?: number } | undefined): Project {
|
||||
const project: Project = new Project();
|
||||
|
||||
// required fields
|
||||
@ -11,6 +11,11 @@ export default class ProjectTestService {
|
||||
project.slug = project.name;
|
||||
project.isBlocked = false;
|
||||
project.requireSsoForLogin = false;
|
||||
|
||||
if(data && data.seatLimit){
|
||||
project.seatLimit = data.seatLimit;
|
||||
}
|
||||
|
||||
project.smsOrCallCurrentBalanceInUSDCents = 0;
|
||||
project.autoRechargeSmsOrCallByBalanceInUSD = 0;
|
||||
project.autoRechargeSmsOrCallWhenCurrentBalanceFallsInUSD = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user