Last active
June 9, 2017 02:25
-
-
Save bxcodec/e49a92334c7755b5aaa1547d80e0c769 to your computer and use it in GitHub Desktop.
Article fbs Flatbuffer
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
namespace articles; | |
table Image { | |
url: string ; | |
mime : string ; | |
width : int ; | |
height : int ; | |
} | |
table Content { | |
type :string; | |
} | |
table Paragraph{ | |
base: Content; | |
text: string; | |
} | |
table ImageContent { | |
base: Content; | |
url: string ; | |
mime: string ; | |
width:int ; | |
height: int ; | |
} | |
union ContentUnion {ImageContent,Paragraph } | |
table ContentContainer { | |
contents: ContentUnion; | |
} | |
table Article { | |
id : long ; | |
title: string; | |
excerpt: string ; | |
html: string; | |
content : [ContentContainer]; | |
url : string; | |
images : [Image]; | |
publish_time: string ; | |
categories : [long]; | |
source_id : long ; | |
} | |
root_type Article; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment