financial changes

This commit is contained in:
surya 2021-07-14 17:44:44 +05:30
parent eee6056f57
commit 80f35b16e2
10 changed files with 272 additions and 0 deletions

View File

@ -0,0 +1,40 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Helpers\ResponseBuilder;
use App\Models\BROKENPERIOD;
use App\Models\ENTITIES;
use App\Models\FINANCIALS;
use App\Models\FIN_REMARKS;
use App\Models\ITEMSMASTER;
use App\Models\SECTIONSMASTER;
use App\Models\STATEMENTSMASTER;
use App\Models\SUBSECTIONMASTER;
//use Illuminate\Database\Eloquent\Builder;
class FinancialController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
//
}
public function test(Request $request)
{
// echo "hi";
$data = ENTITIES::all();
//return $data;
// return ResponseBuilder::sendResponse($data, 200, array('Content-Type'=>'application/json; charset=utf-8' ));
// $data = $request->name;
return ResponseBuilder::sendResponse(200,'success',$data);
}
}

View File

@ -0,0 +1,28 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class BROKENPERIOD extends Model
{
const CREATED_AT = 'createdon';
const UPDATED_AT = 'updatedon';
protected $table = 'brokenperiod';
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = ['entity_id','from','to','months','cy','py','variation','createdby','updatedby'];
protected $hidden = [];
/**
* The attributes excluded from the model's JSON form.
*
* @var array
*/
}

28
app/Models/ENTITIES.PHP Normal file
View File

@ -0,0 +1,28 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class ENTITIES extends Model
{
const CREATED_AT = 'createdon';
const UPDATED_AT = 'updatedon';
protected $table = 'entities';
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = ['losid','pan','cin','bizname','entity_type','activity_group','biz_act_desc','createdby','updatedby'];
protected $hidden = [];
/**
* The attributes excluded from the model's JSON form.
*
* @var array
*/
}

28
app/Models/FINANCIALS.PHP Normal file
View File

@ -0,0 +1,28 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class FINANCIALS extends Model
{
const CREATED_AT = 'createdon';
const UPDATED_AT = 'updatedon';
protected $table = 'financials';
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = ['entity_id','fy','st_type','itemid','value','createdby','updatedby'];
protected $hidden = [];
/**
* The attributes excluded from the model's JSON form.
*
* @var array
*/
}

View File

@ -0,0 +1,28 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class FIN_REMARKS extends Model
{
const CREATED_AT = 'createdon';
const UPDATED_AT = 'updatedon';
protected $table = 'fin_remarks';
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = ['entity_id','itemid','remarks','createdby','updatedby'];
protected $hidden = [];
/**
* The attributes excluded from the model's JSON form.
*
* @var array
*/
}

View File

@ -0,0 +1,28 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class ITEMSMASTER extends Model
{
const CREATED_AT = 'createdon';
const UPDATED_AT = 'updatedon';
protected $table = 'itemsmaster';
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = ['statement','section','subsection','itemtext','createdby','updatedby'];
protected $hidden = [];
/**
* The attributes excluded from the model's JSON form.
*
* @var array
*/
}

View File

@ -0,0 +1,28 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class SECTIONSMASTER extends Model
{
const CREATED_AT = 'createdon';
const UPDATED_AT = 'updatedon';
protected $table = 'sectionsmaster';
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = ['statement','section','createdby','updatedby'];
protected $hidden = [];
/**
* The attributes excluded from the model's JSON form.
*
* @var array
*/
}

View File

@ -0,0 +1,28 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class STATEMENTSMASTER extends Model
{
const CREATED_AT = 'createdon';
const UPDATED_AT = 'updatedon';
protected $table = 'statementsmaster';
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = ['statement','createdby','updatedby'];
protected $hidden = [];
/**
* The attributes excluded from the model's JSON form.
*
* @var array
*/
}

View File

@ -0,0 +1,28 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class SUBSECTIONMASTER extends Model
{
const CREATED_AT = 'createdon';
const UPDATED_AT = 'updatedon';
protected $table = 'subsectionmaster';
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = ['statement','subsection','itemtext','createdby','updatedby'];
protected $hidden = [];
/**
* The attributes excluded from the model's JSON form.
*
* @var array
*/
}

View File

@ -26,6 +26,14 @@ $router->group(['prefix' => 'api'], function () use ($router) {
});
$router->group(['prefix' => 'api'], function () use ($router) {
$router->get('test', 'FinancialController@test');
});