joseff
1 month ago

Please help me with the table structure.

Posted 1 month ago by joseff

WHAT AM I TRYING TO DO

application manager, calendar, custom content template application, facebook application (bring the last post) etc. briefly application manager. also a system where I can store pictures, videos and live broadcast information.

The problem I am in. I need an application manager but cannot merge these tables.

How should I do this? Can I find a sample structure?

installed_apps url live_streams image

I have to merge these tables in media_manager tables. According to the type of content in the media manager table, I need to go to the relevant table and shoot the content.

My example code

    Schema::create('media_manager', function (Blueprint $table) {
        $table->increments('id');
        $table->integer('customer_id')->unsigned()->nullable();
       
       here I have to do something to join all the tables. but I don't know exactly what.
    });



    Schema::create('app_types', function (Blueprint $table) {
        $table->increments('id');
        $table->string('slug');
        $table->string('name');
        $table->softDeletes();
        $table->timestamps();
    });

    Schema::create('app_categories', function (Blueprint $table) {
        $table->increments('id');
        $table->string('slug');
        $table->string('name');
        $table->softDeletes();
        $table->timestamps();
    });

    Schema::create('apps', function (Blueprint $table) {
        $table->increments('id');
        $table->string('name');
        $table->string('icon')->nullable();
        $table->integer('type_id')->unsigned();
        $table->integer('cat_id')->unsigned();
        $table->json('manifest_json')->nullable();
        $table->softDeletes();
        $table->timestamps();
    });

    Schema::create('installed_apps', function (Blueprint $table) {
        $table->increments('id');
        $table->integer('instance_app_id')->unsigned()->nullable();
        $table->integer('partner_id')->unsigned()->nullable();
        $table->json('data')->nullable();
        $table->json('configuration')->nullable();
        $table->softDeletes();
        $table->timestamps();
    });

    Schema::create('image', function (Blueprint $table) {
        $table->increments('id');
        $table->integer('partner_id')->unsigned()->nullable();
        $table->string('title')->nullable();
        $table->bigInteger('duration')->unsigned()->nullable();
        $table->integer('dimension_height')->unsigned()->nullable();
        $table->integer('dimension_width')->unsigned()->nullable();
        $table->string('url')->nullable();
        $table->longText('thumbnail')->nullable();
        $table->softDeletes();
        $table->timestamps();
    });

    Schema::create('url', function (Blueprint $table) {
        $table->increments('id');
        $table->integer('partner_id')->unsigned()->nullable();
        $table->string('title')->nullable();
        $table->bigInteger('duration')->unsigned()->nullable();
        $table->string('url')->nullable();
        $table->longText('thumbnail')->nullable();
        $table->softDeletes();
        $table->timestamps();
    });

    Schema::create('live_streams', function (Blueprint $table) {
        $table->increments('id');
        $table->integer('partner_id')->unsigned()->nullable();
        $table->string('title')->nullable();
        $table->string('url')->nullable();
        $table->longText('thumbnail')->nullable();
        $table->softDeletes();
        $table->timestamps();
    });

Please sign in or create an account to participate in this conversation.