Merged PR 3: added models

added models
This commit is contained in:
Iris Raab
2022-04-29 08:39:33 +00:00
committed by Philip Stockerer
2 changed files with 60 additions and 0 deletions

28
models/product.class.php Normal file
View File

@@ -0,0 +1,28 @@
<?php
class Product {
//public $product_id;
public $name;
public $price;
public $description;
public $stock;
public $weight;
public $image;
public $category;
//public $created_at;
public $category_name;
public $category_description;
public function __construct($product_id, $name, $price, $description, $stock, $weight, $image, $category, $created_at, $category_name, $category_description) {
$this->product_id = $product_id;
$this->name = $name;
$this->price = $price;
$this->description=$description;
$this->stock = $stock;
$this->weight=$weight;
$this->image = $image;
$this->category=$category;
$this->created_at=$created_at;
$this->category_name=$category_name;
$this->category_description=$category_description;
}
}

32
models/user.class.php Normal file
View File

@@ -0,0 +1,32 @@
<?php
class User {
//public $user_id;
public $username;
public $password;
public $email;
public $firstname;
public $lastname;
//public $role;
//public $created_at;
public $street;
public $streetnumber;
public $postalcode;
public $country;
public $phone;
public function __construct($user_id, $username, $password, $email, $firstname, $lastname, $role, $created_at, $street, $streetnumber, $postalcode, $country, $phone) {
$this->user_id = $user_id;
$this->username = $username;
$this->password = $password;
$this->email=$email;
$this->firstname = $firstname;
$this->lastname=$lastname;
$this->role=$role;
$this->created_at=$created_at;
$this->street = $street;
$this->streetnumber=$streetnumber;
$this->postalcode=$postalcode;
$this->country = $country;
$this->phone=$phone;
}
}