Untitled

mail@pastecode.io avatar
unknown
javascript
a year ago
1.2 kB
1
Indexable
Never
{
	
	author: User,

	title: string,
	description: string,
	cover: string,

	category: Category,

	info: {
		// is the content free or paid
		availability: enum[Public, Subscriber],
		// Can everybody see this content
		visibility: enum[Public, Me],
		// Is the creation completed or it's inprogress
		state: enum[Completed, Inprogress],
		language: Language,
	},

	// estimated reading time
	readingTime: number,

	// people who help making this content
	collaborators: [{
		user: User,
		role: enum[Editor, Translator, Illustrator, Proofreader, Copywriter]
	}],

	interactions: {
		likes: number,
		views: number,
		bookmarks: number,
	}

	review: Review[{
		author: User,
		content: string,
		score: number,
		timestamp
	}],

	comments: Comment[].

	totalCost: {
		wr: number,
		
		// percentage discount
		offer: number,
	}

	chapter: [{
		title: string,
		/* string is for novels and string[] 
			is for comics which is an array of images */
		content: string | string[],
		cover: string,
		
		info: {
			visibility: enum[Public, Subscriber],
			availability: enum[Public, Subscriber],
			state: enum[Completed, Inprogress]
		},

		readingTime: number,

		cost: {
			wr: number,
			
			// percentage discount
			offer: number
		}
	}]
}