fix : 테넌트 코드, 등록,수정 ID 추가
This commit is contained in:
@@ -21,6 +21,8 @@ public function up(): void
|
||||
$table->decimal('quantity', 18, 4)->default(1);
|
||||
$table->json('attributes')->nullable()->comment('동적 속성');
|
||||
$table->integer('sort_order')->default(0);
|
||||
$table->unsignedBigInteger('created_by')->comment('생성자(회원PK)');
|
||||
$table->unsignedBigInteger('updated_by')->nullable()->comment('수정자(회원PK)');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
|
||||
@@ -23,6 +23,8 @@ public function up(): void
|
||||
$table->boolean('is_default')->default(false)->comment('기본BOM여부');
|
||||
$table->boolean('is_active')->default(true)->comment('사용여부');
|
||||
$table->unsignedBigInteger('image_file_id')->nullable()->index('boms_image_file_id_foreign')->comment('첨부파일ID');
|
||||
$table->unsignedBigInteger('created_by')->comment('생성자(회원PK)');
|
||||
$table->unsignedBigInteger('updated_by')->nullable()->comment('수정자(회원PK)');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@ public function up(): void
|
||||
$table->json('attributes')->nullable()->comment('동적 속성');
|
||||
$table->string('description')->nullable()->comment('설명');
|
||||
$table->tinyInteger('is_active')->default(1)->comment('사용여부');
|
||||
$table->unsignedBigInteger('created_by')->comment('생성자(회원PK)');
|
||||
$table->unsignedBigInteger('updated_by')->nullable()->comment('수정자(회원PK)');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
|
||||
@@ -20,6 +20,8 @@ public function up(): void
|
||||
$table->decimal('price', 18, 4)->comment('단가');
|
||||
$table->date('started_at');
|
||||
$table->date('ended_at')->nullable();
|
||||
$table->unsignedBigInteger('created_by')->comment('생성자(회원PK)');
|
||||
$table->unsignedBigInteger('updated_by')->nullable()->comment('수정자(회원PK)');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
|
||||
@@ -20,6 +20,8 @@ public function up(): void
|
||||
$table->json('attributes')->nullable()->comment('동적 속성');
|
||||
$table->string('description')->nullable()->comment('설명');
|
||||
$table->tinyInteger('is_active')->default(1)->comment('사용여부');
|
||||
$table->unsignedBigInteger('created_by')->comment('생성자(회원PK)');
|
||||
$table->unsignedBigInteger('updated_by')->nullable()->comment('수정자(회원PK)');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ public function up(): void
|
||||
{
|
||||
Schema::create('materials', function (Blueprint $table) {
|
||||
$table->id()->comment('자재 PK');
|
||||
$table->unsignedBigInteger('tenant_id')->comment('테넌트ID');
|
||||
$table->string('name', 100)->comment('자재명(품명)');
|
||||
$table->string('specification', 100)->nullable()->comment('규격');
|
||||
$table->string('material_code', 50)->unique()->comment('자재코드');
|
||||
@@ -17,6 +18,8 @@ public function up(): void
|
||||
$table->char('is_inspection', 1)->default('N')->comment('검사대상 여부(Y/N)');
|
||||
$table->text('search_tag')->nullable()->comment('검색 태그');
|
||||
$table->text('remarks')->nullable()->comment('비고');
|
||||
$table->unsignedBigInteger('created_by')->comment('생성자(회원PK)');
|
||||
$table->unsignedBigInteger('updated_by')->nullable()->comment('수정자(회원PK)');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
|
||||
@@ -10,11 +10,14 @@ public function up(): void
|
||||
{
|
||||
Schema::create('lot_sales', function (Blueprint $table) {
|
||||
$table->id()->comment('로트별 판매기록 PK');
|
||||
$table->unsignedBigInteger('tenant_id')->comment('테넌트ID');
|
||||
$table->unsignedBigInteger('lot_id')->comment('로트ID');
|
||||
$table->date('sale_date')->comment('판매일');
|
||||
$table->string('author', 50)->nullable()->comment('등록자');
|
||||
$table->string('workplace_name', 60)->nullable()->comment('작업장명');
|
||||
$table->text('remarks')->nullable()->comment('비고');
|
||||
$table->unsignedBigInteger('created_by')->comment('생성자(회원PK)');
|
||||
$table->unsignedBigInteger('updated_by')->nullable()->comment('수정자(회원PK)');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
$table->index('lot_id', 'idx_sales_lot_id');
|
||||
|
||||
@@ -10,6 +10,7 @@ public function up(): void
|
||||
{
|
||||
Schema::create('lots', function (Blueprint $table) {
|
||||
$table->id()->comment('로트관리 PK');
|
||||
$table->unsignedBigInteger('tenant_id')->comment('테넌트ID');
|
||||
$table->string('lot_number', 30)->unique()->comment('로트번호');
|
||||
$table->unsignedBigInteger('material_id')->comment('자재ID');
|
||||
$table->string('specification', 100)->nullable()->comment('규격');
|
||||
@@ -19,6 +20,8 @@ public function up(): void
|
||||
$table->string('fabric_lot', 30)->nullable()->comment('원단 로트');
|
||||
$table->string('author', 50)->nullable()->comment('작성자');
|
||||
$table->text('remarks')->nullable()->comment('비고');
|
||||
$table->unsignedBigInteger('created_by')->comment('생성자(회원PK)');
|
||||
$table->unsignedBigInteger('updated_by')->nullable()->comment('수정자(회원PK)');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
$table->index('material_id', 'idx_lots_material_id');
|
||||
|
||||
@@ -13,6 +13,8 @@ public function up(): void
|
||||
$table->unsignedBigInteger('inspection_id')->comment('수입검사ID');
|
||||
$table->string('item_name', 100)->comment('검사항목명');
|
||||
$table->char('is_checked', 1)->default('N')->comment('체크여부(Y/N)');
|
||||
$table->unsignedBigInteger('created_by')->comment('생성자(회원PK)');
|
||||
$table->unsignedBigInteger('updated_by')->nullable()->comment('수정자(회원PK)');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
$table->index('inspection_id', 'idx_items_inspection_id');
|
||||
|
||||
@@ -11,6 +11,7 @@ public function up(): void
|
||||
Schema::create('material_inspections', function (Blueprint $table) {
|
||||
$table->id()->comment('수입검사 PK');
|
||||
$table->unsignedBigInteger('receipt_id')->comment('자재입고ID');
|
||||
$table->unsignedBigInteger('tenant_id')->comment('테넌트ID');
|
||||
$table->date('inspection_date')->comment('검사일자');
|
||||
$table->string('inspector_name', 50)->nullable()->comment('검사자');
|
||||
$table->string('approver_name', 50)->nullable()->comment('결재자');
|
||||
@@ -18,6 +19,8 @@ public function up(): void
|
||||
$table->string('status_code', 30)->comment('상태코드(common_codes)');
|
||||
$table->text('result_file_path')->nullable()->comment('성적서 PDF 경로');
|
||||
$table->text('remarks')->nullable()->comment('비고');
|
||||
$table->unsignedBigInteger('created_by')->comment('생성자(회원PK)');
|
||||
$table->unsignedBigInteger('updated_by')->nullable()->comment('수정자(회원PK)');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
$table->index('receipt_id', 'idx_inspections_receipt_id');
|
||||
|
||||
@@ -11,6 +11,7 @@ public function up(): void
|
||||
Schema::create('material_receipts', function (Blueprint $table) {
|
||||
$table->id()->comment('자재입고 PK');
|
||||
$table->unsignedBigInteger('material_id')->comment('자재ID');
|
||||
$table->unsignedBigInteger('tenant_id')->comment('테넌트ID');
|
||||
$table->date('receipt_date')->comment('입고일');
|
||||
$table->string('lot_number', 30)->comment('로트번호');
|
||||
$table->decimal('received_qty', 12, 2)->comment('입고수량');
|
||||
@@ -23,6 +24,8 @@ public function up(): void
|
||||
$table->char('is_inspection', 1)->default('N')->comment('검사대상 여부(Y/N)');
|
||||
$table->date('inspection_date')->nullable()->comment('검사일자');
|
||||
$table->text('remarks')->nullable()->comment('비고');
|
||||
$table->unsignedBigInteger('created_by')->comment('생성자(회원PK)');
|
||||
$table->unsignedBigInteger('updated_by')->nullable()->comment('수정자(회원PK)');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
$table->index('material_id', 'idx_receipts_material_id');
|
||||
|
||||
Reference in New Issue
Block a user