-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
449 implement application layer (#455)
- Refactored to create Application layer - Refactored View Models to separate folder - Defined static Requirement.req_type - Added Epic.protype.functionalBehavior
- Loading branch information
Showing
233 changed files
with
3,004 additions
and
4,572 deletions.
There are no files selected for viewing
File renamed without changes.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './OrganizationInteractor.js' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,11 @@ | ||
import { Entity } from "@mikro-orm/core"; | ||
import { Requirement } from "./Requirement.js"; | ||
import { ReqType } from "./ReqType.js"; | ||
import { type Properties } from "../types/index.js"; | ||
|
||
/** | ||
* A part of a Project, Environment, System, or Goals that may affect or be affected by the associated entities | ||
*/ | ||
@Entity({ abstract: true, discriminatorValue: ReqType.ACTOR }) | ||
export abstract class Actor extends Requirement { | ||
constructor(props: Properties<Omit<Actor, 'id' | 'req_type'>>) { | ||
super(props) | ||
this.req_type = ReqType.ACTOR | ||
} | ||
static override req_type: ReqType = ReqType.ACTOR; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,17 @@ | ||
import { Entity } from "@mikro-orm/core"; | ||
import { Requirement } from "./Requirement.js"; | ||
import { type Properties } from "../types/index.js"; | ||
import { ReqType } from "./ReqType.js"; | ||
|
||
export const assumptionReqIdPrefix = 'E.4.' as const; | ||
export type AssumptionReqId = `${typeof assumptionReqIdPrefix}${number}`; | ||
export type AssumptionReqId = `${typeof Assumption.reqIdPrefix}${number}`; | ||
|
||
/** | ||
* Posited property of the environment | ||
*/ | ||
@Entity({ discriminatorValue: ReqType.ASSUMPTION }) | ||
export class Assumption extends Requirement { | ||
constructor(props: Properties<Omit<Assumption, 'id' | 'req_type'>>) { | ||
super(props); | ||
this.req_type = ReqType.ASSUMPTION; | ||
} | ||
static override reqIdPrefix = 'E.4.' as const; | ||
static override req_type = ReqType.ASSUMPTION; | ||
|
||
override get reqId(): AssumptionReqId | undefined { return super.reqId as AssumptionReqId | undefined } | ||
override set reqId(value: AssumptionReqId | undefined) { super.reqId = value } | ||
override get reqId() { return super.reqId as `${typeof Assumption.reqIdPrefix}${number}` | undefined } | ||
override set reqId(value) { super.reqId = value } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,11 @@ | ||
import { Entity } from "@mikro-orm/core"; | ||
import { Actor } from "./Actor.js"; | ||
import { ReqType } from "./ReqType.js"; | ||
import { type Properties } from "../types/index.js"; | ||
|
||
/** | ||
* Idenfitication of a part (of the Project, Environment, Goals, or System) | ||
*/ | ||
@Entity({ abstract: true, discriminatorValue: ReqType.COMPONENT }) | ||
export abstract class Component extends Actor { | ||
constructor(props: Properties<Omit<Component, 'id' | 'req_type'>>) { | ||
super(props) | ||
this.req_type = ReqType.COMPONENT | ||
} | ||
static override req_type: ReqType = ReqType.COMPONENT; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,15 @@ | ||
import { Entity } from "@mikro-orm/core"; | ||
import { Requirement } from "./Requirement.js"; | ||
import { type Properties } from "../types/index.js"; | ||
import { ReqType } from "./ReqType.js"; | ||
|
||
export const effectReqIdPrefix = 'E.5.' as const; | ||
export type EffectReqId = `${typeof effectReqIdPrefix}${number}`; | ||
|
||
/** | ||
* Environment property affected by the system | ||
*/ | ||
@Entity({ discriminatorValue: ReqType.EFFECT }) | ||
export class Effect extends Requirement { | ||
constructor(props: Properties<Omit<Effect, 'id' | 'req_type'>>) { | ||
super(props); | ||
this.req_type = ReqType.EFFECT; | ||
} | ||
static override reqIdPrefix = 'E.5.' as const; | ||
static override req_type = ReqType.EFFECT; | ||
|
||
override get reqId(): EffectReqId | undefined { return super.reqId as EffectReqId | undefined } | ||
override set reqId(value: EffectReqId | undefined) { super.reqId = value } | ||
override get reqId() { return super.reqId as `${typeof Effect.reqIdPrefix}${number}` | undefined } | ||
override set reqId(value) { super.reqId = value } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,15 @@ | ||
import { Entity } from "@mikro-orm/core"; | ||
import { Component } from "./Component.js"; | ||
import { type Properties } from "../types/index.js"; | ||
import { ReqType } from "./ReqType.js"; | ||
|
||
export const environmentComponentReqIdPrefix = 'E.2.' as const; | ||
export type EnvironmentComponentReqId = `${typeof environmentComponentReqIdPrefix}${number}`; | ||
|
||
/** | ||
* Represents a component that is part of an environment. | ||
*/ | ||
@Entity({ discriminatorValue: ReqType.ENVIRONMENT_COMPONENT }) | ||
export class EnvironmentComponent extends Component { | ||
constructor(props: Properties<Omit<EnvironmentComponent, 'id' | 'req_type'>>) { | ||
super(props); | ||
this.req_type = ReqType.ENVIRONMENT_COMPONENT; | ||
} | ||
static override reqIdPrefix = 'E.2.' as const; | ||
static override req_type = ReqType.ENVIRONMENT_COMPONENT; | ||
|
||
override get reqId(): EnvironmentComponentReqId | undefined { return super.reqId as EnvironmentComponentReqId | undefined } | ||
override set reqId(value: EnvironmentComponentReqId | undefined) { super.reqId = value } | ||
override get reqId() { return super.reqId as `${typeof EnvironmentComponent.reqIdPrefix}${number}` | undefined } | ||
override set reqId(value) { super.reqId = value } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,32 @@ | ||
import { Entity } from "@mikro-orm/core"; | ||
import { Entity, ManyToOne } from "@mikro-orm/core"; | ||
import { Scenario } from "./Scenario.js"; | ||
import { ReqType } from "./ReqType.js"; | ||
|
||
export const epicReqIdPrefix = 'G.5.' as const; | ||
export type EpicReqId = `${typeof epicReqIdPrefix}${number}`; | ||
import type { Properties } from "../types/index.js"; | ||
import { FunctionalBehavior } from "./FunctionalBehavior.js"; | ||
|
||
/** | ||
* An Epic is a collection of Use Cases and User Stories all directed towards a common goal. | ||
* Ex: "decrease the percentage of of fraudulent sellers by 20%" | ||
*/ | ||
@Entity({ discriminatorValue: ReqType.EPIC }) | ||
export class Epic extends Scenario { | ||
constructor(props: Omit<Epic, 'id' | 'req_type'>) { | ||
static override reqIdPrefix = 'G.5.' as const; | ||
static override req_type = ReqType.EPIC; | ||
|
||
constructor(props: Properties<Omit<Epic, 'id' | 'req_type'>>) { | ||
super(props); | ||
this.req_type = ReqType.EPIC; | ||
this.functionalBehavior = props.functionalBehavior; | ||
} | ||
|
||
override get reqId(): EpicReqId | undefined { return super.reqId as EpicReqId | undefined } | ||
override set reqId(value: EpicReqId | undefined) { super.reqId = value } | ||
override get reqId() { return super.reqId as `${typeof Epic.reqIdPrefix}${number}` | undefined } | ||
override set reqId(value) { super.reqId = value } | ||
|
||
private _functionalBehavior?: FunctionalBehavior; | ||
|
||
/** | ||
* The action that the user wants to perform. | ||
*/ | ||
@ManyToOne({ entity: () => FunctionalBehavior }) | ||
get functionalBehavior(): FunctionalBehavior | undefined { return this._functionalBehavior; } | ||
set functionalBehavior(value: FunctionalBehavior | undefined) { this._functionalBehavior = value; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,11 @@ | ||
import { Entity } from "@mikro-orm/core"; | ||
import { Behavior } from "./Behavior.js"; | ||
import { ReqType } from "./ReqType.js"; | ||
import { type Properties } from "../types/index.js"; | ||
|
||
/** | ||
* Illustration of behavior through a usage scenario | ||
*/ | ||
@Entity({ abstract: true, discriminatorValue: ReqType.EXAMPLE }) | ||
export abstract class Example extends Behavior { | ||
constructor(props: Properties<Omit<Example, 'id' | 'req_type'>>) { | ||
super(props) | ||
this.req_type = ReqType.EXAMPLE | ||
} | ||
static override req_type: ReqType = ReqType.EXAMPLE; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,17 @@ | ||
import { Entity } from "@mikro-orm/core"; | ||
import { Functionality } from "./Functionality.js"; | ||
import { type Properties } from "../types/index.js"; | ||
import { ReqType } from "./ReqType.js"; | ||
|
||
export const functionalBehaviorReqIdPrefix = 'S.2.' as const; | ||
export type FunctionalBehaviorReqId = `${typeof functionalBehaviorReqIdPrefix}${number}`; | ||
|
||
/** | ||
* FunctionalBehavior specifies **what** behavior the system should exhibit, i.e., | ||
* the results or effects of the system's operation. | ||
* Generally expressed in the form "system must do <requirement>" | ||
*/ | ||
@Entity({ discriminatorValue: ReqType.FUNCTIONAL_BEHAVIOR }) | ||
export class FunctionalBehavior extends Functionality { | ||
constructor(props: Properties<Omit<FunctionalBehavior, 'id' | 'req_type'>>) { | ||
super(props); | ||
this.req_type = ReqType.FUNCTIONAL_BEHAVIOR; | ||
} | ||
static override reqIdPrefix = 'S.2.' as const; | ||
static override req_type = ReqType.FUNCTIONAL_BEHAVIOR; | ||
|
||
override get reqId(): FunctionalBehaviorReqId | undefined { return super.reqId as FunctionalBehaviorReqId | undefined } | ||
override set reqId(value: FunctionalBehaviorReqId | undefined) { super.reqId = value } | ||
override get reqId() { return super.reqId as `${typeof FunctionalBehavior.reqIdPrefix}${number}` | undefined } | ||
override set reqId(value) { super.reqId = value } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,11 @@ | ||
import { Entity } from "@mikro-orm/core"; | ||
import { Behavior } from "./Behavior.js"; | ||
import { ReqType } from "./ReqType.js"; | ||
import { type Properties } from "../types/index.js"; | ||
|
||
/** | ||
* Functionality describes what system will do and how it will do it. | ||
*/ | ||
@Entity({ abstract: true, discriminatorValue: ReqType.FUNCTIONALITY }) | ||
export abstract class Functionality extends Behavior { | ||
constructor(props: Properties<Omit<Functionality, 'id' | 'req_type'>>) { | ||
super(props) | ||
this.req_type = ReqType.FUNCTIONALITY | ||
} | ||
static override req_type: ReqType = ReqType.FUNCTIONALITY; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,15 @@ | ||
import { Entity } from "@mikro-orm/core"; | ||
import { Component } from "./Component.js"; | ||
import { type Properties } from "../types/index.js"; | ||
import { ReqType } from "./ReqType.js"; | ||
|
||
export const glossaryTermReqIdPrefix = 'E.1.' as const; | ||
export type GlossaryTermReqId = `${typeof glossaryTermReqIdPrefix}${number}`; | ||
|
||
/** | ||
* A word or phrase that is part of a glossary. Provides a definition for the term | ||
*/ | ||
@Entity({ discriminatorValue: ReqType.GLOSSARY_TERM }) | ||
export class GlossaryTerm extends Component { | ||
constructor(props: Properties<Omit<GlossaryTerm, 'id' | 'req_type'>>) { | ||
super(props); | ||
this.req_type = ReqType.GLOSSARY_TERM; | ||
} | ||
static override reqIdPrefix = 'E.1.' as const; | ||
static override req_type = ReqType.GLOSSARY_TERM; | ||
|
||
override get reqId(): GlossaryTermReqId | undefined { return super.reqId as GlossaryTermReqId | undefined } | ||
override set reqId(value: GlossaryTermReqId | undefined) { super.reqId = value } | ||
override get reqId() { return super.reqId as `${typeof GlossaryTerm.reqIdPrefix}${number}` | undefined } | ||
override set reqId(value) { super.reqId = value } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,11 @@ | ||
import { Entity } from "@mikro-orm/core"; | ||
import { Noise } from "./Noise.js"; | ||
import { ReqType } from "./ReqType.js"; | ||
import { type Properties } from "../types/index.js"; | ||
|
||
/** | ||
* Design or implementation suggestion | ||
*/ | ||
@Entity({ discriminatorValue: ReqType.HINT }) | ||
export class Hint extends Noise { | ||
constructor(props: Properties<Omit<Hint, 'id' | 'req_type'>>) { | ||
super(props) | ||
this.req_type = ReqType.HINT | ||
} | ||
static override req_type: ReqType = ReqType.HINT; | ||
} |
Oops, something went wrong.