diff --git a/lib/interfaces/Assignable.ts b/lib/interfaces/Assignable.ts index f9f9ab9..5d22e9f 100644 --- a/lib/interfaces/Assignable.ts +++ b/lib/interfaces/Assignable.ts @@ -1,11 +1,22 @@ -export abstract class Assignable { - protected data: Record = {}; +export interface Assignable { + assign (a: Assignable): void; + assign_to (a: Assignable): void; +} + +export abstract class Persistent { + private data: Record = {}; + private properties: Record; + + public constructor() { + this.properties = this.define_properties(); + } + + public abstract define_properties(): Record; public assign (da: Assignable): void { this.assign_object (da.get_data ()); } - public assign_to (da: Assignable): void { da.assign (this); } @@ -18,4 +29,6 @@ export abstract class Assignable { public get_data (): Record { return this.data; } + + wip }