You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
906 B
25 lines
906 B
4 years ago
|
import {FirebaseResource, FirebaseResourceItem} from "../FirebaseResource"
|
||
|
import {Injectable} from "@extollo/di"
|
||
|
import {RTDBRef} from "../units/FirebaseUnit"
|
||
|
import {AsyncCollection} from "@extollo/util"
|
||
|
|
||
|
/**
|
||
|
* Interface representing a client-submitted encounter transaction.
|
||
|
*/
|
||
|
export interface ExposureResourceItem extends FirebaseResourceItem {
|
||
|
clientID: string; // the exposed client's ID - used as one half of the hashes
|
||
|
timestamp: number; // the unix-time in milliseconds when the interaction occurred
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* A Firebase realtime-database resource for managing exposure transactions.
|
||
|
*/
|
||
|
@Injectable()
|
||
|
export class ExposureResource extends FirebaseResource<ExposureResourceItem> {
|
||
|
public static collect(): AsyncCollection<ExposureResourceItem> {
|
||
|
return new AsyncCollection<ExposureResourceItem>(new ExposureResource())
|
||
|
}
|
||
|
|
||
|
protected refName: RTDBRef = 'exposure'
|
||
|
}
|