Created
December 12, 2019 13:35
-
-
Save siman/34d819138ac9edaf23a34d7fbb99c5e7 to your computer and use it in GitHub Desktop.
Property types for Joystream versioned store codegen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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