/**
 * CreateBlogCommand
 * Blog létrehozási command
 */
export class CreateBlogCommand {
  constructor(data) {
    this.title = data.title;
    this.content = data.content;
    this.authorId = data.authorId;
    this.published = data.published || false;
  }

  validate() {
    const errors = [];
    
    if (!this.title || this.title.trim().length === 0) {
      errors.push('Title is required');
    }
    
    if (!this.content || this.content.trim().length === 0) {
      errors.push('Content is required');
    }
    
    if (!this.authorId) {
      errors.push('Author ID is required');
    }
    
    return {
      isValid: errors.length === 0,
      errors
    };
  }
}
