# Class: ActivityStoredClass<OnRunEventType> (/nqtr/index/classes/ActivityStoredClass)



Defined in: [src/classes/activity/ActivityStoredClass.ts:13](https://github.com/DRincs-Productions/nqtr/blob/db22fe9e7612d547ff25befcc444cf095348917d/src/classes/activity/ActivityStoredClass.ts#L13)

## Extends [#extends]

* `StoredClassModel`

## Extended by [#extended-by]

* [`ActivityBaseModel`](/nqtr/index/classes/ActivityBaseModel)
* [`CommitmentStoredClass`](/nqtr/index/classes/CommitmentStoredClass)

## Type Parameters [#type-parameters]

### OnRunEventType [#onruneventtype]

`OnRunEventType` = [`ActivityInterface`](/nqtr/index/interfaces/ActivityInterface)

## Implements [#implements]

* `ActivityBaseInternalInterface`

## Constructors [#constructors]

### Constructor [#constructor]

\> **new ActivityStoredClass**\<`OnRunEventType`>(`id`, `_onRun`, `props`, `category?`): `ActivityStoredClass`\<`OnRunEventType`>

Defined in: [src/classes/activity/ActivityStoredClass.ts:17](https://github.com/DRincs-Productions/nqtr/blob/db22fe9e7612d547ff25befcc444cf095348917d/src/classes/activity/ActivityStoredClass.ts#L17)

#### Parameters [#parameters]

##### id [#id]

`string`

##### \_onRun [#_onrun]

[`OnRunEvent`](/nqtr/index/type-aliases/OnRunEvent)\<`OnRunEventType`>

##### props [#props]

[`ActivityStoredClassProps`](/nqtr/index/interfaces/ActivityStoredClassProps)

##### category? [#category]

`string` = `ACTIVITY_CATEGORY`

#### Returns [#returns]

`ActivityStoredClass`\<`OnRunEventType`>

#### Overrides [#overrides]

`StoredClassModel.constructor`

## Properties [#properties]

### \_onRun [#_onrun-1]

\> `protected` `readonly` **\_onRun**: [`OnRunEvent`](/nqtr/index/type-aliases/OnRunEvent)\<`OnRunEventType`>

Defined in: [src/classes/activity/ActivityStoredClass.ts:19](https://github.com/DRincs-Productions/nqtr/blob/db22fe9e7612d547ff25befcc444cf095348917d/src/classes/activity/ActivityStoredClass.ts#L19)

***

### id [#id-1]

\> `readonly` **id**: `string`

Defined in: node_modules/@drincs/pixi-vn/dist/StoredClassModel-uMifeNzV.d.ts:41

Is id of the stored class. is unique for this class.

#### Implementation of [#implementation-of]

`ActivityBaseInternalInterface.id`

#### Inherited from [#inherited-from]

`StoredClassModel.id`

## Accessors [#accessors]

### dateScheduling [#datescheduling]

#### Get Signature [#get-signature]

\> **get** **dateScheduling**(): [`DateSchedulingInterface`](/nqtr/index/interfaces/DateSchedulingInterface) | `undefined`

Defined in: [src/classes/activity/ActivityStoredClass.ts:34](https://github.com/DRincs-Productions/nqtr/blob/db22fe9e7612d547ff25befcc444cf095348917d/src/classes/activity/ActivityStoredClass.ts#L34)

Used to schedule what date it will be added and removed.

##### Returns [#returns-1]

[`DateSchedulingInterface`](/nqtr/index/interfaces/DateSchedulingInterface) | `undefined`

#### Implementation of [#implementation-of-1]

`ActivityBaseInternalInterface.dateScheduling`

***

### expired [#expired]

#### Get Signature [#get-signature-1]

\> **get** **expired**(): `boolean`

Defined in: [src/classes/activity/ActivityStoredClass.ts:48](https://github.com/DRincs-Productions/nqtr/blob/db22fe9e7612d547ff25befcc444cf095348917d/src/classes/activity/ActivityStoredClass.ts#L48)

Whether the activity/commitment is a deadline, so it will then be removed or hidden.

It **depends only on the date**, not the time. So if you set \{ dateScheduling: \{ from: 0, to: 3 }, timeSlot \{ from: 10, to: 20 } } the activity/commitment hidden or deleted on date 3 at 0.

##### Returns [#returns-2]

`boolean`

#### Implementation of [#implementation-of-2]

`ActivityBaseInternalInterface.expired`

***

### run [#run]

#### Get Signature [#get-signature-2]

\> **get** **run**(): [`OnRunAsyncFunction`](/nqtr/index/type-aliases/OnRunAsyncFunction)

Defined in: [src/classes/activity/ActivityStoredClass.ts:41](https://github.com/DRincs-Productions/nqtr/blob/db22fe9e7612d547ff25befcc444cf095348917d/src/classes/activity/ActivityStoredClass.ts#L41)

The function that is called when the activity/commitment is runned.

##### Returns [#returns-3]

[`OnRunAsyncFunction`](/nqtr/index/type-aliases/OnRunAsyncFunction)

#### Implementation of [#implementation-of-3]

`ActivityBaseInternalInterface.run`

***

### timeSlot [#timeslot]

#### Get Signature [#get-signature-3]

\> **get** **timeSlot**(): [`TimeSchedulingInterface`](/nqtr/index/interfaces/TimeSchedulingInterface) | [`TimeSchedulingInterface`](/nqtr/index/interfaces/TimeSchedulingInterface)\[] | `undefined`

Defined in: [src/classes/activity/ActivityStoredClass.ts:29](https://github.com/DRincs-Productions/nqtr/blob/db22fe9e7612d547ff25befcc444cf095348917d/src/classes/activity/ActivityStoredClass.ts#L29)

Time slot in which activity/commitment will be active.

##### Returns [#returns-4]

[`TimeSchedulingInterface`](/nqtr/index/interfaces/TimeSchedulingInterface) | [`TimeSchedulingInterface`](/nqtr/index/interfaces/TimeSchedulingInterface)\[] | `undefined`

#### Implementation of [#implementation-of-4]

`ActivityBaseInternalInterface.timeSlot`

## Methods [#methods]

### addTempHistoryItem() [#addtemphistoryitem]

\> `protected` **addTempHistoryItem**(): `void`

Defined in: [src/classes/activity/ActivityStoredClass.ts:38](https://github.com/DRincs-Productions/nqtr/blob/db22fe9e7612d547ff25befcc444cf095348917d/src/classes/activity/ActivityStoredClass.ts#L38)

#### Returns [#returns-5]

`void`

***

### getStorageProperty() [#getstorageproperty]

\> `protected` **getStorageProperty**\<`T`>(`propertyName`, `idToUse?`): `T` | `undefined`

Defined in: node_modules/@drincs/pixi-vn/dist/StoredClassModel-uMifeNzV.d.ts:56

Get a property from the storage.

#### Type Parameters [#type-parameters-1]

##### T [#t]

`T` = `StorageElementType`

#### Parameters [#parameters-1]

##### propertyName [#propertyname]

`string`

The name of the property to get.

##### idToUse? [#idtouse]

`string`

The id of the instance to get the property.

#### Returns [#returns-6]

`T` | `undefined`

The value of the property. If the property is not found, returns undefined.

#### Default [#default]

```ts
this.id
```

#### Inherited from [#inherited-from-1]

`StoredClassModel.getStorageProperty`

***

### isActive() [#isactive]

\> **isActive**(`options?`): `boolean`

Defined in: [src/classes/activity/ActivityStoredClass.ts:55](https://github.com/DRincs-Productions/nqtr/blob/db22fe9e7612d547ff25befcc444cf095348917d/src/classes/activity/ActivityStoredClass.ts#L55)

Whether the activity/commitment is active, so it will be shown in the routine and can be runned.

#### Parameters [#parameters-2]

##### options? [#options]

[`ActiveScheduling`](/nqtr/index/interfaces/ActiveScheduling) = `{}`

The options to check if the activity/commitment is active.

#### Returns [#returns-7]

`boolean`

#### Implementation of [#implementation-of-5]

`ActivityBaseInternalInterface.isActive`

***

### migrateOldStorage() [#migrateoldstorage]

\> `protected` **migrateOldStorage**(`oldCategoryId?`): `void`

Defined in: node_modules/@drincs/pixi-vn/dist/StoredClassModel-uMifeNzV.d.ts:37

#### Parameters [#parameters-3]

##### oldCategoryId? [#oldcategoryid]

`string`

#### Returns [#returns-8]

`void`

#### Inherited from [#inherited-from-2]

`StoredClassModel.migrateOldStorage`

***

### setStorageProperty() [#setstorageproperty]

\> `protected` **setStorageProperty**\<`T`>(`propertyName`, `value`): `void`

Defined in: node_modules/@drincs/pixi-vn/dist/StoredClassModel-uMifeNzV.d.ts:49

Update a property in the storage.

#### Type Parameters [#type-parameters-2]

##### T [#t-1]

`T`

The type of the value to set. (Deprecated, it is not necessary to specify the type of the value, it will be inferred from the value)

#### Parameters [#parameters-4]

##### propertyName [#propertyname-1]

`string`

The name of the property to set.

##### value [#value]

`StorageElementType`

The value to set. If is undefined, the property will be removed from the storage.

#### Returns [#returns-9]

`void`

#### Inherited from [#inherited-from-3]

`StoredClassModel.setStorageProperty`
