initial code commit
This commit is contained in:
21
Model/Bill.php
Normal file
21
Model/Bill.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace Hpz937\BillReminder\Model;
|
||||
|
||||
class Bill {
|
||||
public int $id;
|
||||
public string $dueDate; // Format: 'YYYY-MM-DD'
|
||||
public float $amount;
|
||||
public string $description;
|
||||
public bool $isPaid;
|
||||
|
||||
public function __construct(int $id, string $dueDate, float $amount, string $description, bool $isPaid) {
|
||||
$this->id = $id;
|
||||
$this->dueDate = $dueDate;
|
||||
$this->amount = $amount;
|
||||
$this->description = $description;
|
||||
$this->isPaid = $isPaid;
|
||||
}
|
||||
|
||||
// Additional methods as needed, such as getters and setters
|
||||
}
|
||||
20
Model/User.php
Normal file
20
Model/User.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace Hpz937\BillReminder\Model;
|
||||
|
||||
class User {
|
||||
public int $id;
|
||||
public string $username;
|
||||
private string $passwordHash;
|
||||
|
||||
public function __construct(int $id, string $username, string $passwordHash) {
|
||||
$this->id = $id;
|
||||
$this->username = $username;
|
||||
$this->passwordHash = $passwordHash;
|
||||
}
|
||||
|
||||
// Add methods for password verification, etc.
|
||||
public function verifyPassword(string $password): bool {
|
||||
return password_verify($password, $this->passwordHash);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user