progress scene builder
This commit is contained in:
parent
0a4eea19c5
commit
50d0c4c12b
64 changed files with 858 additions and 1315 deletions
17
ui/src/features/scene_manager/model/scene_view_model.ts
Normal file
17
ui/src/features/scene_manager/model/scene_view_model.ts
Normal 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);
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue