12 lines
342 B
TypeScript
12 lines
342 B
TypeScript
import { Model } from "./AbstractModel";
|
|
import { UserModel } from "./UserModel";
|
|
|
|
export class ModelFactory {
|
|
static createModel(modelName: string): Model {
|
|
switch (modelName) {
|
|
// case "USER": return new UserModel();
|
|
// break;
|
|
default: throw new Error("Invalid model name");
|
|
}
|
|
}
|
|
} |