Skip to content

Commit

Permalink
added users model
Browse files Browse the repository at this point in the history
  • Loading branch information
srgoogle23 committed Dec 28, 2024
1 parent 279926e commit 0091f5b
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions app/Model/User.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?php

declare(strict_types=1);

namespace App\Model;

use Carbon\Carbon;
use Hyperf\DbConnection\Model\Model;

/**
* @property string $id
* @property string $name
* @property string $email
* @property string $password
* @property Carbon $created_at
* @property Carbon $updated_at
*/
class User extends Model
{
/**
* @var string
*/
public $keyType = 'string';

/**
* @var bool
*/
public $incrementing = false;

/**
* The table associated with the model.
*/
protected ?string $table = 'users';

/**
* The attributes that are mass assignable.
*/
protected array $fillable = ['id', 'name', 'email', 'password', 'created_at', 'updated_at'];

/**
* The attributes that should be cast to native types.
*/
protected array $casts = ['created_at' => 'datetime', 'updated_at' => 'datetime'];
}

0 comments on commit 0091f5b

Please sign in to comment.