Skip to content

Instantly share code, notes, and snippets.

@siman
Created December 12, 2019 13:35
Show Gist options
  • Save siman/34d819138ac9edaf23a34d7fbb99c5e7 to your computer and use it in GitHub Desktop.
Save siman/34d819138ac9edaf23a34d7fbb99c5e7 to your computer and use it in GitHub Desktop.
Property types for Joystream versioned store codegen
abstract class BaseProperty {
public type: string;
public name: string;
public description?: string;
public required?: boolean = false;
}
export class PrimitiveProperty extends BaseProperty {}
export class VecProperty extends BaseProperty {
public maxItems: number;
}
export class TextProperty extends BaseProperty {
public maxTextLength: number;
}
export class TextVecProperty extends BaseProperty {
public maxItems: number;
public maxTextLength: number;
}
export class InternalProperty extends BaseProperty {
public classId: any;
}
export class InternalVecProperty extends BaseProperty {
public maxItems: number;
public classId: any;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment