1
This commit is contained in:
@@ -20,26 +20,21 @@ use Hyperf\Snowflake\Concern\Snowflake;
|
||||
* @property \Carbon\Carbon $created_at 创建时间
|
||||
* @property \Carbon\Carbon $updated_at 修改时间
|
||||
*/
|
||||
class CodeLog extends Model
|
||||
class LogCode extends Model
|
||||
{
|
||||
use Snowflake;
|
||||
|
||||
/**
|
||||
* The table associated with the model.
|
||||
*/
|
||||
protected ?string $table = 'code_log';
|
||||
protected ?string $table = 'log_code';
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected array $fillable = ['code_log_id', 'type', 'status', 'scene', 'phone', 'code', 'third_code', 'remarks', 'created_at', 'updated_at'];
|
||||
protected array $fillable = ['log_id', 'type', 'status', 'scene', 'phone', 'code', 'third_code', 'remarks', 'created_at', 'updated_at'];
|
||||
|
||||
/**
|
||||
* The attributes that should be cast to native types.
|
||||
*/
|
||||
protected array $casts = ['code_log_id' => 'string', 'type' => 'integer', 'status' => 'integer', 'scene' => 'integer', 'created_at' => 'datetime', 'updated_at' => 'datetime'];
|
||||
|
||||
protected string $primaryKey = "code_log_id";
|
||||
protected string $primaryKey = "log_id";
|
||||
|
||||
/**
|
||||
* 获取信息-单条
|
||||
@@ -68,9 +63,9 @@ class CodeLog extends Model
|
||||
/**
|
||||
* 新增-批量
|
||||
* @param array $data
|
||||
* @return \Hyperf\Database\Model\Model|CodeLog
|
||||
* @return \Hyperf\Database\Model\Model|LogCode
|
||||
*/
|
||||
public static function addCodeLog(array $data): \Hyperf\Database\Model\Model|CodeLog
|
||||
public static function addCodeLog(array $data): \Hyperf\Database\Model\Model|LogCode
|
||||
{
|
||||
return self::create($data);
|
||||
}
|
||||
Reference in New Issue
Block a user