enum Network { BABYLON ALEXANDRIA ROME } type Block @entity { "Block number as a string" id: ID! block: Int! timestamp: Int! nework: Network! } "Stored information about a registered user" type Member @entity { "MemberId: runtime identifier for a user" id: ID! "The unique handle chosen by member" handle: String @unique @fulltext(query: "handles") "A Url to member's Avatar image" avatarUri: String "Short text chosen by member to share information about themselves" about: String "Blocknumber when member was registered" registeredAtBlock: Int! "Member's controller account id" controllerAccount: Bytes! "Member's root account id" rootAccount: Bytes! happenedIn: Block! } """ This type is to keep which entity belongs to which class. This type will be used by EntityCreated event. When a new schema support added to an Entity we will get the class name from this table. We need this because we can't create a database row (Channel, Video etc) without with empty fields. """ type ClassEntity @entity { "Runtime entity identifier (EntityId)" id: ID! "The class id of this entity" classId: Int! happenedIn: Block! } #### High Level Derivative Entities #### type Language @entity { "Runtime entity identifier (EntityId)" id: ID! name: String! code: String! happenedIn: Block! } type Channel @entity { "Runtime entity identifier (EntityId)" id: ID! # "Owner of the channel" Commenting out this field: 'owner' can be curator_group, lead # or a member. We are not handling events related to curator group so we will not set this field # owner: Member! "The title of the Channel" title: String! @fulltext(query: "titles") "The description of a Channel" description: String! "Url for Channel's cover (background) photo. Recommended ratio: 16:9." coverPhotoURL: String! "Channel's avatar photo." avatarPhotoURL: String! "Flag signaling whether a channel is public." isPublic: Boolean! "Flag signaling whether a channel is curated/verified." isCurated: Boolean! "The primary langauge of the channel's content" languageId: Int # videos: [Video!] @derivedFrom(field: "channel") happenedIn: Block! } type Category @entity { "Runtime entity identifier (EntityId)" id: ID! "The name of the category" name: String! @unique @fulltext(query: "names") "The description of the category" description: String # videos: [Video!] @derivedFrom(field: "category") happenedIn: Block! } "Encoding and containers" type VideoMediaEncoding @entity { "Runtime entity identifier (EntityId)" id: ID! name: String! } type KnownLicense @entity { "Runtime entity identifier (EntityId)" id: ID! "Short, commonly recognized code of the licence (ie. CC_BY_SA)" code: String! @unique "Full, descriptive name of the license (ie. Creative Commons - Attribution-NonCommercial-NoDerivs)" name: String "Short description of the license conditions" description: String "An url pointing to full license content" url: String happenedIn: Block! } type UserDefinedLicense @entity { "Runtime entity identifier (EntityId)" id: ID! "Custom license content" content: String! happenedIn: Block! } type JoystreamMediaLocation @entity { "Runtime entity identifier (EntityId)" id: ID! "Id of the data object in the Joystream runtime dataDirectory module" dataObjectId: String! @unique happenedIn: Block! } type HttpMediaLocation @entity { "Runtime entity identifier (EntityId)" id: ID! "The http url pointing to the media" url: String! "The port to use when connecting to the http url (defaults to 80)" port: Int happenedIn: Block! } type VideoMedia @entity { "Runtime entity identifier (EntityId)" id: ID! "Encoding of the video media object" encodingId: Int! "Video media width in pixels" pixelWidth: Int! "Video media height in pixels" pixelHeight: Int! "Video media size in bytes" size: Int # video: Video! @derivedFrom(field: "media") # One of the location field will be non-null # httpMediaLocation: HttpMediaLocation # joystreamMediaLocation: JoystreamMediaLocation locationId: Int! happenedIn: Block! } type Video @entity { "Runtime entity identifier (EntityId)" id: ID! "Reference to member's channel" channelId: Int! "Reference to a video category" categoryId: Int! "The title of the video" title: String! @fulltext(query: "titles") "The description of the Video" description: String! "Video duration in seconds" duration: Int! "Video's skippable intro duration in seconds" skippableIntroDuration: Int "Video thumbnail url (recommended ratio: 16:9)" thumbnailURL: String! "Video's main langauge" languageId: Int "Reference to VideoMedia" videoMediaId: Int! "Whether or not Video contains marketing" hasMarketing: Boolean "If the Video was published on other platform before beeing published on Joystream - the original publication date" publishedBeforeJoystream: Int "Whether the Video is supposed to be publically displayed" isPublic: Boolean! "Video curation status set by the Curator" isCurated: Boolean! "Whether the Video contains explicit material." isExplicit: Boolean! # Lincense licenseId: Int! happenedIn: Block! }