krgm.so-manager-dev.com/app/Models/Tax.php

39 lines
771 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Tax extends Model
{
use HasFactory;
// テーブル名
protected $table = 'tax';
// 主キー
protected $primaryKey = 'tax_id';
// 主キーが自動増分
public $incrementing = true;
// 主キーの型
protected $keyType = 'int';
// Laravel の自動タイムスタンプ
public $timestamps = true;
// 更新可能なカラム
protected $fillable = [
'tax_percent', // 消費税率
'tax_day', // 適用日
'operator_id', // オペレーターID
];
// キャスト(型変換)
protected $casts = [
'tax_day' => 'date',
];
}