Module: Users

    users
        id: bigint, unsigned, auto-increment, primary key
        name: string
        email: string, unique
        password: string
        email_verified_at: timestamp, nullable
        remember_token: string, nullable
        created_at: timestamp, nullable
        updated_at: timestamp, nullable
        deleted_at: timestamp, nullable
        Relationships
            Belongs to many Roles
            Has many Posts
            Has many Comments
            Has many Likes


Module: Categories

    categories
        id: bigint, unsigned, auto-increment, primary key
        name: string
        slug: string, unique
        description: text, nullable
        parent_id: bigint, unsigned, nullable, foreign key to categories.id
        created_at: timestamp, nullable
        updated_at: timestamp, nullable
        deleted_at: timestamp, nullable
        Relationships
            Has many Posts
            Belongs to Parent Category
            Has many Subcategories

Module: Tags

    tags
        id: bigint, unsigned, auto-increment, primary key
        name: string
        slug: string, unique
        created_at: timestamp, nullable
        updated_at: timestamp, nullable
        deleted_at: timestamp, nullable
        Relationships
            Belongs to many Posts


Module: Blog Posts

    posts
        id: bigint, unsigned, auto-increment, primary key
        user_id: bigint, unsigned, foreign key to users.id
        title: string
        slug: string, unique
        content: text
	excerpt: text, nullable
        status: enum('draft', 'published', 'archived')
        published_at: timestamp, nullable
	seo_title: string, nullable
	seo_description: text, nullable
        created_at: timestamp, nullable
        updated_at: timestamp, nullable
        deleted_at: timestamp, nullable
        Relationships
            Belongs to User
            Belongs to many Categories
            Belongs to many Tags
	    Has many Likes
            Has many Comments
            Has many Media

Module: Post_Category (Pivot Table)

    post_category
        post_id: bigint, unsigned, foreign key to posts.id
        category_id: bigint, unsigned, foreign key to categories.id
        created_at: timestamp, nullable
        updated_at: timestamp, nullable

Module: Post_Tag (Pivot Table)

    post_tag
        post_id: bigint, unsigned, foreign key to posts.id
        tag_id: bigint, unsigned, foreign key to tags.id
        created_at: timestamp, nullable
        updated_at: timestamp, nullable

Module: Comments

    comments
        id: bigint, unsigned, auto-increment, primary key
        post_id: bigint, unsigned, foreign key to posts.id
        user_id: bigint, unsigned, foreign key to users.id, nullable
        parent_id: bigint, unsigned, nullable, foreign key to comments.id
        content: text
        status: enum('approved', 'pending', 'spam')
        created_at: timestamp, nullable
        updated_at: timestamp, nullable
        deleted_at: timestamp, nullable
        Relationships
            Belongs to Post
            Belongs to User
            Has many Replies (Comments)

Module:  Like
	id**: bigint, unsigned, auto-increment, primary key
	user_id: bigint, unsigned, foreign key referencing `users.id`
	post_id: bigint, unsigned, foreign key referencing `posts.id`
	created_at: timestamp, nullable
	updated_at: timestamp, nullable
	Relationships
    		Belongs to User
    		Belongs to Post


Module: Media

    media
        id: bigint, unsigned, auto-increment, primary key
        post_id: bigint, unsigned, foreign key to posts.id, nullable
        user_id: bigint, unsigned, foreign key to users.id
        file_path: string
        file_type: string
        size: bigint
        title: string, nullable
        alt_text: string, nullable
        created_at: timestamp, nullable
        updated_at: timestamp, nullable
        deleted_at: timestamp, nullable
        Relationships
            Belongs to Post
            Belongs to User


Module: Reports

    reports
        id: bigint, unsigned, auto-increment, primary key
        title: string
        description: text, nullable
        report_type: string
        parameters: json, nullable
        generated_at: timestamp, nullable
        user_id: bigint, unsigned, foreign key to users.id
        created_at: timestamp, nullable
        updated_at: timestamp, nullable
        deleted_at: timestamp, nullable
        Relationships
            Belongs to User


Module: Settings

    settings
        id: bigint, unsigned, auto-increment, primary key
        key: string, unique
        value: text, nullable
        created_at: timestamp, nullable
        updated_at: timestamp, nullable
        deleted_at: timestamp, nullable
        Relationships
            None

For each of the database table schema above, Using the Chain of Thought Prompting, Meticulously generate a well-structured Laravel migration, model and a model factory class that Adhere to Laravel best practices, including naming conventions, code organization, and SOLID principles and Ensure that the code is clean, maintainable, and follows the DRY (Don't Repeat Yourself) principle and also PHPDoc should be comprehensive, detailing parameters, return types, and exceptions thrown. The aim of the generated code is to adhere to Laravel  best practices, coding standard, and deliver the highest standards of software development, delivering a well-documented, robust, and efficient module that fulfills the application's business requirements and provides an exceptional user experience: