rename src to source
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import type { ColumnType } from 'kysely';
|
||||
|
||||
/** Kysely column type for millisecond epoch timestamps stored as integers. */
|
||||
export type Timestamp = ColumnType<number, number | undefined, number | undefined>;
|
||||
|
||||
/** Kysely column type for binary blobs accepting Buffer or Uint8Array on insert. */
|
||||
export type BlobColumn = ColumnType<Buffer, Buffer | Uint8Array, Buffer>;
|
||||
|
||||
/**
|
||||
* One row per (resource_id, public_key). Each publicKey owns a slot within a shared resource.
|
||||
*/
|
||||
export interface ResourceDataTable {
|
||||
/** Shared resource identifier grouping related instances. */
|
||||
resource_id: string;
|
||||
|
||||
/** Owner identity for this instance slot within the resource. */
|
||||
public_key: string;
|
||||
|
||||
/** Opaque serialized resource payload. */
|
||||
blob: BlobColumn;
|
||||
|
||||
/** Millisecond timestamp of the last write. */
|
||||
timestamp: Timestamp;
|
||||
}
|
||||
|
||||
/** Complete Kysely schema mapping for the sync server database. */
|
||||
export interface DatabaseTables {
|
||||
resource_data: ResourceDataTable;
|
||||
}
|
||||
Reference in New Issue
Block a user