# Class Snapshot

- Defined in models/snapshot.ts:32

##### Index

### Constructors

constructor

### Properties

created
hash
id?
name?
pack?

### Methods

restore_entity
entity_history
find
findOne
latest
take_if_changed

## Constructors

### constructor

- new Snapshot(o: SnapshotCfg | Snapshot): Snapshot

  Library constructor

  #### Parameters

  - o: SnapshotCfg | Snapshot

  #### Returns Snapshot

  - Defined in models/snapshot.ts:43

## Properties

### created

created: Date

- Defined in models/snapshot.ts:34

### hash

hash: string

- Defined in models/snapshot.ts:36

### `Optional` id

id?: number

- Defined in models/snapshot.ts:33

### `Optional` name

name?: string

- Defined in models/snapshot.ts:37

### `Optional` pack

pack?: Pack

- Defined in models/snapshot.ts:35

## Methods

### restore_entity

- restore_entity(type: string, name: string): Promise<undefined>

  #### Parameters

  - type: string
  - name: string

  #### Returns Promise<undefined>

  - Defined in models/snapshot.ts:98

### `Static` entity_history

- entity_history(type: string, name: string): Promise<Snapshot[]>

  #### Parameters

  - type: string
  - name: string

  #### Returns Promise<Snapshot[]>

  - Defined in models/snapshot.ts:138

### `Static` find

- find(where: Where, selectopts?: SelectOptions): Promise<Snapshot[]>

  #### Parameters

  - where: Where
  - `Optional` selectopts: SelectOptions

  #### Returns Promise<Snapshot[]>

  - Defined in models/snapshot.ts:51

### `Static` findOne

- findOne(where: Where): Promise<Snapshot | null>

  #### Parameters

  - where: Where

  #### Returns Promise<Snapshot | null>

  - Defined in models/snapshot.ts:58

### `Static` latest

- latest(): Promise<Snapshot | null>

  #### Returns Promise<Snapshot | null>

  - Defined in models/snapshot.ts:64

### `Static` take_if_changed

- take_if_changed(name?: string): Promise<boolean>

  #### Parameters

  - `Optional` name: string

  #### Returns Promise<boolean>

  - Defined in models/snapshot.ts:73