34 lines
803 B
TypeScript
34 lines
803 B
TypeScript
/**
|
|
* A copy is the digital counterpart of a work.
|
|
* It corresponds to a unique file or set of files which represent the work on the users device.
|
|
*
|
|
* Multiple works can have multiple copies (think of different scans of a physical work, or lossy compression).
|
|
*/
|
|
interface CopyInterface extends IdentifiableInterface {
|
|
/**
|
|
* the work this entity is a copy of
|
|
*/
|
|
original: Promise<WorkInterface> | Identifier;
|
|
|
|
/**
|
|
* where to find this specific copy
|
|
*/
|
|
sources: Promise<SourceInterface[]> | Identifier[];
|
|
|
|
/**
|
|
* identifying hash of the file contents
|
|
*/
|
|
hash: string;
|
|
|
|
/**
|
|
* device location of the copy
|
|
*/
|
|
location: string | null;
|
|
|
|
/**
|
|
* the ordering of the copies belonging to the same work,
|
|
* lower number is higher ranked
|
|
*/
|
|
ranking: number;
|
|
}
|