export class Role {
	constructor(
		public id: number,
		public name: string
	) { }
}

export class User {
	constructor(
		public key: string,
		public name: string,
		public email: string,
		public password: string,
		public image: string,
		public inscriptionDate: Date,
		public role: Role,
		public token: string
	) { }
}

export class Post {
	constructor(
		public key: string,
		public title: string,
		public text: string,
		public description: string,
		public image: string,
		public creationDate: Date,
		public author: User,
		public category: Category
	) { }
}

export class Category {
	constructor(
		public id: number,
		public name: string,
		public listSubCategories: Array<Category>
	) { }
}

export class Image {
	constructor(
		public id: number,
		public link: string
	) { }
}

/**
 * Class to send the new password to backoffice in order to change the user password.
 */
export class PasswordWrapper {
	constructor(
		public oldPassword: string,
		public newPassword: string,
		public confirmPassword: string
	) { }
}

export class Version {
	constructor(
		public id: number,
		public number: string,
		public active: boolean
	) { }
}

export class VersionRevision {
	constructor(
		public id: number,
		public text: string,
		public version: Version,
		public bugfix: boolean
	) { }
}
