Skip to main content

Organisation

Defined in: domain/Organisation.ts:17

Represents an Organisation entity. Extends Deletable to support soft deletion.

Remarks

Use Organisation.getProjects to retrieve the associated projects for this organisation.

Example

const org = new Organisation(1, "Acme Corp", new Date(), null);
const projects = await org.getProjects();

Extends

Constructors

Constructor

new Organisation(
id?,
name?,
createdAt?,
deletedAt?): Organisation;

Defined in: domain/Organisation.ts:32

Creates a new Organisation instance.

Parameters

id?

number

The unique identifier for the organisation.

name?

string

The name of the organisation.

createdAt?

Date

The date the organisation was created.

deletedAt?

The date the organisation was deleted (if applicable).

null | Date

Returns

Organisation

Overrides

Deletable.constructor

Properties

createdAt?

optional createdAt: Date;

Defined in: domain/Organisation.ts:21

The creation date of the organisation.


deleted

deleted: boolean;

Defined in: types/Deletable.ts:21

Indicates whether the entity is deleted.

Inherited from

Deletable.deleted


deletedAt

deletedAt: null | Date;

Defined in: types/Deletable.ts:23

The date the entity was deleted, or null if not deleted.

Inherited from

Deletable.deletedAt


id?

optional id: number;

Defined in: types/Id.ts:15

The unique identifier for the entity.

Inherited from

Deletable.id


name?

optional name: string;

Defined in: domain/Organisation.ts:19

The name of the organisation.

Methods

getProjects()

getProjects(): Promise<Projects>;

Defined in: domain/Organisation.ts:47

Retrieves the projects associated with this organisation.

Returns

Promise<Projects>

A promise that resolves to a Projects instance.