progress scene builder

This commit is contained in:
IDONTSUDO 2024-06-25 12:43:41 +03:00
parent 0a4eea19c5
commit 50d0c4c12b
64 changed files with 858 additions and 1315 deletions

View file

@ -0,0 +1,17 @@
import { Result } from "../../../core/helper/result";
export class SceneViewModel {
name: string;
constructor(name: string) {
this.name = name;
}
static empty() {
return new SceneViewModel("");
}
valid = (): Result<string,SceneViewModel> => {
if (this.name.isEmpty()) {
return Result.error("name is empty");
}
return Result.ok(this);
};
}