Commit c2284c42 authored by okhin's avatar okhin 🚴

Merge branch 'preprod' into '62-ajout-d-un-lien-sur-les-piplomes-dans-l-historique'

# Conflicts:
#   app/view/user/perso.html
parents 0d7023da c2a62621
Pipeline #2217 passed with stages
in 11 seconds
......@@ -16,3 +16,8 @@ __MAC
tests/_data
tests/_output
tests/_support/_generated
tests/_output/*
/var/log/*
!/var/log/.gitkeep
/.php_cs.cache
tests/*/_generated/*
......@@ -69,6 +69,7 @@ job install:
environment: preprod
variables:
PHINX_ENVIRONMENT: "development"
PROD_HOME: "/home/don/don/"
script:
- chmod a+x ci/install.sh
- ./ci/install.sh
......@@ -83,7 +84,7 @@ job deploy:
environment: production
variables:
PHINX_ENVIRONMENT: "production"
PROD_HOME: "$PROD_HOME"
PROD_HOME: "/home/don/don/"
script:
- chmod a+x ci/install.sh
- ./ci/install.sh
......
......@@ -72,8 +72,8 @@ class Perso extends Controller
foreach ($result->fetchAll(\PDO::FETCH_ASSOC) as $row) {
$pdfs[$row['pdf']] = $row;
}
$addresses = $f3->get('container')['address_finder']->findByUserId((int) $data['id']);
$f3->set('adresses', $addresses);
$addresse = $f3->get('container')['address_finder']->findByUserId((int) $data['id']);
$f3->set('adresse', $addresse);
$f3->set('pdfs', $pdfs);
}
......@@ -93,7 +93,7 @@ class Perso extends Controller
{
// Chargement des dons de l'utilisateur
$db = $f3->get('DB');
$result = $db->query("SELECT datec, somme, id, pdf, status FROM dons WHERE user_id='".$f3->get('infos.id')."' AND status IN (1,4,102) ORDER BY datec ASC");
$result = $db->query("SELECT datec, somme, id, pdf, status FROM dons WHERE user_id='".$f3->get('infos.id')."' AND status IN (1,4,102) ORDER BY datec DESC");
$data = array();
foreach ($result->fetchAll(\PDO::FETCH_ASSOC) as $row) {
$data[] = $row;
......@@ -116,6 +116,7 @@ class Perso extends Controller
public function login($f3, $args)
{
$f3->clear('SESSION.error');
$f3->clear('SESSION.message');
$f3->set('form_visible', 'login');
if ($f3->get('action')=='renew_password') {
......@@ -268,7 +269,7 @@ class Perso extends Controller
if ($f3->exists('SESSION.id')) {
// Let's firts check that both the password match
if ($f3->get('password') != $f3->get('password_confirmation')) {
$f3->set('SESSION.error', 'Passwords mismatch');
$f3->set('SESSION.error', _("Les mots de passe ne correspondent pas"));
} else {
$sql = "UPDATE users SET email='".\Utils::asl($f3->get('email'))."',
pseudo='".\Utils::asl($f3->get('pseudo'))."'";
......@@ -292,7 +293,6 @@ class Perso extends Controller
$f3->error('401');
}
// Let's get the email adress of the user
switch ($f3->get('action')) {
case 'ADD':
try {
......@@ -300,36 +300,19 @@ class Perso extends Controller
new AddressCreateCommand(
\Utils::asl($f3->get('SESSION.id')),
\Utils::asl($f3->get('nom')),
\Utils::asl($f3->get('alias')),
\Utils::asl($f3->get('adresse')),
\Utils::asl($f3->get('adresse2')),
\Utils::asl($f3->get('codepostal')),
\Utils::asl($f3->get('ville')),
\Utils::asl($f3->get('pays')),
\Utils::asl($f3->get('state')),
$f3->exists('defaut')
\Utils::asl($f3->get('state'))
)
);
} catch (AddressAlreadyExistsException $e) {
$f3->set("error", _("Cette adresse existe déjà."));
$f3->error('403');
}
break;
case 'UPDATE':
$f3->get('container')['command_handler']->handle(
new AddressUpdateCommand(
\Utils::asl($f3->get('id')),
\Utils::asl($f3->get('SESSION.id')),
\Utils::asl($f3->get('alias')),
\Utils::asl($f3->get('adresse')),
\Utils::asl($f3->get('adresse2')),
\Utils::asl($f3->get('codepostal')),
\Utils::asl($f3->get('ville')),
\Utils::asl($f3->get('pays')),
\Utils::asl($f3->get('state')),
$f3->exists('defaut')
)
);
$f3->set('SESSION.message', _("Adresse ajoutée à votre profil"));
break;
case 'DELETE':
try {
......@@ -340,9 +323,10 @@ class Perso extends Controller
)
);
} catch (AddressUsedException $e) {
$f3->set("error", _("Cette adresse est utilisée et il vous n'avez pas définit d'adresse par défault."));
$f3->set("error", _("Cette adresse est utilisée pour une de vos contreparties"));
$f3->error('403');
};
$f3->set('SESSION.message', _("Adresse supprimée de votre profil"));
break;
}
$f3->reroute('/perso');
......@@ -401,7 +385,7 @@ class Perso extends Controller
}
// Puis diminution du cumul de la valeur des contreparties
$db->query("UPDATE users SET cumul = cumul - ".$valeur." WHERE id='".$f3->get('SESSION.id')."'");
$f3->set('msg', _("Merci, vos contreparties seront envoyées dès que possible !"));
$f3->set('SESSION.message', _("Merci, vos contreparties seront envoyées dès que possible !"));
$f3->reroute('/perso');
}
......@@ -430,7 +414,7 @@ class Perso extends Controller
FROM dons
INNER JOIN users ON users.id = dons.user_id
LEFT OUTER JOIN adresses ON adresses.user_id = users.id
WHERE users.id=".$f3->get('SESSION.id')." AND adresses.defaut IS true AND dons.id=".\Utils::asl($id).";";
WHERE users.id=".$f3->get('SESSION.id')." AND dons.id=".\Utils::asl($id).";";
$result = $db->query($query);
$logger->write($query);
$don = $result->fetch(\PDO::FETCH_ASSOC);
......@@ -551,6 +535,7 @@ class Perso extends Controller
user_id = '".$user_id."',
identifier = '".$identifier."',
cumul = 0;");
$f3->set('SESSION.message', _("Don récurrent supprimé."));
$f3->reroute('/perso');
}
......
# Database
SQL_HOST=127.0.0.1
SQL_PORT=3306
SQL_DATABASE=soutien
SQL_USER=soutien
SQL_PASSWORD=soutien
export SQL_HOST=127.0.0.1
export SQL_PORT=3306
export SQL_DATABASE=soutien
export SQL_USER=soutien
export SQL_PASSWORD=soutien
# Phinx configuration
PHINX_HOST=${SQL_HOST}
PHINX_PORT=${SQL_PORT}
PHINX_DATABASE=${SQL_DATABASE}
PHINX_USER=${SQL_USER}
PHINX_PASSWORD=${SQL_PASSWORD}
export PHINX_HOST=${SQL_HOST}
export PHINX_PORT=${SQL_PORT}
export PHINX_DATABASE=${SQL_DATABASE}
export PHINX_USER=${SQL_USER}
export PHINX_PASSWORD=${SQL_PASSWORD}
SYSADMIN=replacewithyour@email.com
FDNNURL1=https://secure.fd2n.org/fd2n/cb
FDNNURL2=https://secure.fdn2.org/fdn2/don
BASE_DOMAIN=dev.laquadrature.net
export SYSADMIN=replacewithyour@email.com
export FDNNURL1=https://secure.fd2n.org/fd2n/cb
export FDNNURL2=https://secure.fdn2.org/fdn2/don
export BASE_DOMAIN=dev.laquadrature.net
PAYMENT_URL=http://localhost:5001/payment
RETURN_CHECK_URL=
SITE_ID=XXXXXXXX
CERTIFICATE=XXXXXXXXXXXXXXXXXXXXXXXXx
CTX_MODE=TEST
export PAYMENT_URL=http://localhost:5001/payment
export RETURN_CHECK_URL=
export SITE_ID=XXXXXXXX
export CERTIFICATE=XXXXXXXXXXXXXXXXXXXXXXXXx
export CTX_MODE=TEST
PIPLOME_PATH=/var/www/site/pdf/
PIPLOME_URL=https://www.laquadrature.net/pdf/
export PIPLOME_PATH=/var/www/site/pdf/
export PIPLOME_URL=https://www.laquadrature.net/pdf/
CAMPAIGN_START_DATE=2016-11-10
CAMPAIGN_BUDGET=321000
export CAMPAIGN_START_DATE=2016-11-10
export CAMPAIGN_BUDGET=321000
LOGS=./
export LOGS=./
SMTP_HOST=smtp.example.com
SMTP_PORT=25
SMTP_SECURITY=none
SMTP_USER=user
SMTP_PW=password
export SMTP_HOST=smtp.example.com
export SMTP_PORT=25
export SMTP_SECURITY=none
export SMTP_USER=user
export SMTP_PW=password
DEBUG=0
export DEBUG=0
ENV=dev
export ENV=dev
......@@ -19,9 +19,6 @@
</form>
<p>Erreur: </p>
<repeat group="{{ @SESSION.errors }}" value="{{ @error }}">
<p>{{@error}}</p>
</repeat>
<section id="gift_holder">
<!-- Différents affichages possibles -->
<div id="no_cado" class="cadeaux" style="display:none">
......
<div class="modal-form <check if="{{ @@form_visible == 'login' }}">visible</check>" id="login">
<div class="modal-form-title modal-form-only">
<a class="close modal-form-only" href="/#"><span>{{ _("Fermer") }}</span></a>
<h1>{{_("Se connecter")}}</h1>
<h1>{{_("Connexion")}}</h1>
</div>
<form method="POST" class="form-inline" action="{{ 'login' | alias }}">
<div class="modal-form-body">
<input type="hidden" name="csrf" id="csrf" value="{{ @CSRF }}" />
<fieldset class="form-group modal-form-only">
<h3>{{ _("Le site de dons a changé. À présent, utilisez votre adresse e-mail comme identifiant.") }} </h3>
<check if="{{ @@SESSION.message }}">
<p class="modal-row alert alert-info">{{ @SESSION.message }}</p>
</check>
<check if="{{ @@SESSION.error }}">
<p class="modal-row alert alert-danger">{{ @SESSION.error }}</p>
</check>
<div class="modal-row form-group">
<label for="email">{{ _("Adresse mail") }}</label>
<input class="form-control" type="email" name="email" id="email" required>
......@@ -91,10 +97,10 @@
</ul>
<ul class="nav navbar-nav navbar-right">
<check if="{{ array_key_exists('user', @SESSION) }}">
<true><li><a href="{{ 'logout' | alias }}">{{ _("Se déconnecter") }}</a></li>
<li><a href="{{ 'perso' | alias }}">{{ _("Réclamer les contreparties") }}</a></li></true>
<true><li><a href="{{ 'logout' | alias }}">{{ _("Déconnexion") }}</a></li>
<li><a href="{{ 'perso' | alias }}">{{ _("Contreparties") }}</a></li></true>
<false><li><a href="#add-account">{{ _("Créer un compte")}}</a></li>
<li><a href="#login">{{ _("Se connecter")}}</a></li></false>
<li><a href="#login">{{ _("Connexion")}}</a></li></false>
</check>
</ul>
<ul class="nav navbar-nav navbar-right">
......@@ -125,7 +131,7 @@
<ul class="nav navbar-nav">
<check if="{{ array_key_exists('user', @SESSION) }}">
<true><li class="pull-right collapsible-menu"><a href="#perso-menu">{{ _("Perso") }}</a></li></true>
<false><li class="pull-right"><a href="#login">{{ _("Se connecter")}}</a></li></false>
<false><li class="pull-right"><a href="#login">{{ _("Connexion")}}</a></li></false>
</check>
<li class="pull-right collapsible-menu"><a href="#action-menu">{{ _("Menu") }}</a>
</li>
......@@ -149,3 +155,12 @@
</div>
</nav>
</div>
<section id="messages">
<check if="{{ @@SESSION.message }}">
<p class="alert alert-info">{{ @SESSION.message }}</p>
</check>
<check if="{{ @@SESSION.error }}">
<p class="alert alert-danger">{{ @SESSION.error }}</p>
</check>
</section>
......@@ -32,7 +32,13 @@
<td>
{{ @contrepartie.nom }}<br />
{{ @contrepartie.adresse }}<br />
<check if="{{ @@contrepartie.adresse2 }}">
{{ @contrepartie.adresse2 }}<br />
</check>
{{ @contrepartie.codepostal }} {{ @contrepartie.ville }}<br />
<check if="{{ @@contrepartie.state }}">
{{ @contrepartie.state }}<br />
<check if="{{ @@contrepartie.adresse2 }}">
{{ @contrepartie.pays }}
</td>
<td>
......
......@@ -20,65 +20,36 @@
<!-- Gestion des adresses pour livrer les contreparties -->
<section id="adresses">
<h2>{{ _("Vos adresses :) }}</h2>
<repeat group="{{ @adresses }}" value="{{ @adresse }}" counter="{{ @ctr }}">
<h2>{{ _("Votre adresse postale :) }}</h2>
<form method="post" action="{{ @ALIASES.adresses}}" name="{{ adr.@ctr }}" id="{{ adr.@ctr }}">
<input type="hidden" name="action" id="action" value="UPDATE">
<p><label for="alias">{{ _("Nom de l'adresse (livraison, principale, etc) :") }}</label>
<input name="alias" id="alias" class="{{ Utils::badfield(array(6)) }}" value="{{ @adresse.alias }}" ></p>
<input type="hidden" name="action" id="action" value="ADD">
<p><label for="nom">{{ _("Nom, Prénom, Pseudo (pensez au facteur) :") }}</label>
<input name="nom" id="nom" class="{{ Utils::badfield(array(6)) }}" value="{{ @adresse.nom }}" ></p>
<input name="nom" id="nom" class="{{ Utils::badfield(array(6)) }}" value="{{ @@adresse.nom }}" ></p>
<p><label for="adresse">{{ _("Adresse postale :") }}</label>
<textarea name="adresse" id="adresse" class="{{ Utils::badfield(array(6)) }}">{{ @adresse.adresse }}</textarea></p>
<textarea name="adresse" id="adresse" class="{{ Utils::badfield(array(6)) }}">{{ @@adresse.adresse }}</textarea></p>
<p><label for="adresse2">{{ _("Complément d'adresse :") }}</label>
<textarea name="adresse2" id="adresse2" class="{{ Utils::badfield(array(6)) }}">{{ @adresse.adresse2 }}</textarea></p>
<textarea name="adresse2" id="adresse2" class="{{ Utils::badfield(array(6)) }}">{{ @@adresse.adresse2 }}</textarea></p>
<p><label for="ville">{{ _("Ville :") }}</label>
<input name="ville" id="ville" class="{{ Utils::badfield(array(6)) }}" value="{{ @adresse.ville }}" ></p>
<input name="ville" id="ville" class="{{ Utils::badfield(array(6)) }}" value="{{ @@adresse.ville }}" ></p>
<p><label for="state">{{ _("Province / État :") }}</label>
<input name="state" id="state" class="{{ Utils::badfield(array(6)) }}" value="{{ @@adresse.state }}" ></p>
<p><label for="codepostal">{{ _("Code Postal :") }}</label>
<input name="codepostal" id="codepostal" class="{{ Utils::badfield(array(6)) }}" value="{{ @adresse.codepostal }}" ></p>
<input name="codepostal" id="codepostal" class="{{ Utils::badfield(array(6)) }}" value="{{ @@adresse.codepostal }}" ></p>
<p><label for="pays">{{ _("Pays :") }}</label>
<input name="pays" id="pays" class="{{ Utils::badfield(array(6)) }}" value="{{ @adresse.pays }}" ></p>
<input name="pays" id="pays" class="{{ Utils::badfield(array(6)) }}" value="{{ @@adresse.pays }}" ></p>
<p><input type="submit" class="big_button" value="{{ _('Valider les modifications') }} &gt;&gt;" ></p>
</form>
<form method="post" action="{{ @ALIASES.adresses }}" name="{{ del.@ctr }}" id="{{ del.@ctr }}">
<input type="hidden" name="action" id="action" value="DELETE">
<input type="hidden" name="alias" id="alias" value="{{ @adresse.alias }}">
<p><input type="submit" class="big_button" value="{{ _('Supprimer cette adresse') }}" ></p>
</form>
</repeat>
<form method="post" action="{{ @ALIASES.adresses}}" name="{{ add_adr }}" id="{{ add_adr }}">
<input type="hidden" name="action" id="action" value="ADD">
<p><label for="alias">{{ _("Nom de l'adresse (livraison, principale, etc) :") }}</label>
<input name="alias" id="alias" class="{{ Utils::badfield(array(6)) }}"></p>
<p><label for="nom">{{ _("Nom, Prénom, Pseudo (pensez au facteur) :") }}</label>
<input name="nom" id="nom" class="{{ Utils::badfield(array(6)) }}"></p>
<p><label for="adresse">{{ _("Adresse postale :") }}</label>
<textarea name="adresse" id="adresse" class="{{ Utils::badfield(array(6)) }}"></textarea></p>
<p><label for="adresse2">{{ _("Complément d'adresse :") }}</label>
<textarea name="adresse2" id="adresse2" class="{{ Utils::badfield(array(6)) }}"></textarea></p>
<p><label for="ville">{{ _("Ville :") }}</label>
<input name="ville" id="ville" class="{{ Utils::badfield(array(6)) }}"></p>
<p><label for="codepostal">{{ _("Code Postal :") }}</label>
<input name="codepostal" id="codepostal" class="{{ Utils::badfield(array(6)) }}" ></p>
<p><label for="pays">{{ _("Pays :") }}</label>
<input name="pays" id="pays" class="{{ Utils::badfield(array(6)) }}" ></p>
<p><input type="submit" class="big_button" value="{{ _('Ajouter une adresse postale.') }} &gt;&gt;" /></p>
<p><input type="submit" class="big_button" value="{{ _('Supprimer votre adresse') }}" ></p>
</form>
</section>
<!-- Gestion des demandes de contreparties -->
......@@ -173,17 +144,11 @@
<p id="admin_taille_h"><label for="taille_h">{{ _("Coupe et taille du hoodie:") }}</label>
<select name="taille_h" id="taille_h">{{ Utils::eoption(@atailles, @taille_h) }}</select></p>
<p id="admin_adresses"><label for="alias">{{ _("Adresse de livraison:") }}</label>
<select name="adresse_id" id="adresse_id">
<repeat group="{{ @adresses }}" value="{{ @adresse }}">
<option value="{{ @adresse.id }}">{{@adresse.alias}}</option>
</repeat>
<input type="hidden" name="adresse_id" id="adresse_id" value="{{ @adresse.id }}">
Expédier à&nbsp;: {{@adresse.nom}} {{@adresse.adresse}}
</select></p>
<input type="submit" class="big_button" value="Valider" />
<input type="submit" class="big_button" value="Valider" <check if="{{ @adresse }}"><false>disabled</false>/</check>/>
</div>
<check if="{{ @error!='' }}">
<p class="error">{{ @error }}</p>
</check>
</form>
</check>
</section>
......@@ -32,12 +32,6 @@
<p><input type="button" onclick="document.forms['f1']['create_user'].value=1;document.forms['f1'].submit()" class="btn_password" value="{{ _('Créer un compte') }}" /></p>
</form>
<check if="{{ @error!='' }}">
<p class="error">{{ @error }}</p>
</check>
<check if="{{ @information!='' }}">
<p class="information">{{ @information }}</p>
</check>
</false>
</check>
</section>
This diff is collapsed.
#!/bin/bash
# Ce script est utilisé pour paramétrer l'environnement du site
if [ "x$PROD_HOME" != "x" ]
then
HOME=$PROD_HOME
else
HOME=/var/www/dons/
fi
if [ -e "$HOME/app/env" ]
then
source $HOME/app/env
fi
cd /home/don/don
cd $HOME
git reset --hard
git pull origin $CI_BUILD_REF_NAME
git checkout $CI_BUILD_REF_NAME
......@@ -12,15 +23,15 @@ composer install --no-dev
composer update
# Let's run the migrations
if [ -e "phinx.yml" ]
if [ -e "$HOME/phinx.yml" ]
then
case $CI_BUILD_REF_NAME in
master)
echo "master"
php vendor/robmorgan/phinx/bin/phinx migrate -e production;;
php vendor/robmorgan/phinx/bin/phinx migrate -c $HOME/phinx.yml -e production;;
preprod)
echo "preprod"
php vendor/robmorgan/phinx/bin/phinx migrate -e development;;
php vendor/robmorgan/phinx/bin/phinx migrate -c $HOME/phinx.yml -e development;;
esac
else
case $CI_BUILD_REF_NAME in
......
<?php
use Phinx\Migration\AbstractMigration;
class UneSeuleAdresse extends AbstractMigration
{
/**
* Change Method.
*
* Write your reversible migrations using this method.
*
* More information on writing migrations is available here:
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
*
* The following commands can be used in this method and Phinx will
* automatically reverse them when rolling back:
*
* createTable
* renameTable
* addColumn
* addCustomColumn
* renameColumn
* addIndex
* addForeignKey
*
* Any other destructive changes will result in an error when trying to
* rollback the migration.
*
* Remember to call "create()" or "update()" and NOT "save()" when working
* with the Table class.
*/
public function up()
{
// Removing the alias <> user_id index
$table = $this->table('adresses');
$table->removeIndex(['alias', 'user_id'])
->save();
// Deleting all addresses, to be sure we don't have doubles
$this->execute('TRUNCATE TABLE adresses;');
// Add a unique index on user_id
$table->addForeignKey('user_id', 'users', 'id', ['delete' => 'CASCADE'])
->removeColumn('alias')
->save();
}
public function down() {
$table = $this->table('adresses');
$table->addColumn('alias', 'string')
->removeIndex(['user_id'])
->save();
$table->addIndex(['alias', 'user_id'], ['unique' => true])
->save();
}
}
<?php
use Phinx\Migration\AbstractMigration;
class RemoveAddressDefaut extends AbstractMigration
{
/**
* Change Method.
*
* Write your reversible migrations using this method.
*
* More information on writing migrations is available here:
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
*
* The following commands can be used in this method and Phinx will
* automatically reverse them when rolling back:
*
* createTable
* renameTable
* addColumn
* addCustomColumn
* renameColumn
* addIndex
* addForeignKey
*
* Any other destructive changes will result in an error when trying to
* rollback the migration.
*
* Remember to call "create()" or "update()" and NOT "save()" when working
* with the Table class.
*/
public function up()
{
$table = $this->table('adresses');
$table->removeColumn('defaut')
->save();
}
public function down()
{
$table = $this->table('adresses');
$table->addColumn('defaut', 'boolean')
->save();
}
}
......@@ -24,38 +24,10 @@ class AddressSeeder extends AbstractSeed
'ville' => 'Paris',
'etat' => null,
'pays' => 'France',
'alias' => 'Main',
'user_id' => 1,
'defaut' => true,
),
array(
'id' => 2,
'nom' => 'Second address',
'adresse' => '2 rue Ménars',
'adresse2' => null,
'codepostal' => 75002,
'ville' => 'Paris',
'etat' => null,
'pays' => 'France',
'alias' => 'Second address',
'user_id' => 1,
'defaut' => false,
),
array(
'id' => 4,
'nom' => 'Third address',
'adresse' => '3 rue Ménars',
'adresse2' => null,
'codepostal' => 75003,
'ville' => 'Paris',
'etat' => null,
'pays' => 'France',
'alias' => 'Third address',
'user_id' => 1,
'defaut' => false,
),
array(
'id' => 5,
'nom' => 'Bob address',
'adresse' => '4 rue Ménars',
'adresse2' => null,
......@@ -63,9 +35,7 @@ class AddressSeeder extends AbstractSeed
'ville' => 'Paris',
'etat' => null,
'pays' => 'France',
'alias' => 'Third address',
'user_id' => 2,
'defaut' => false,
),
);
......
......@@ -7,27 +7,23 @@ class AddressCreateCommand
private $addressId;
private $userId;
private $name;
private $alias;
private $address;
private $address2;
private $postalCode;
private $city;
private $country;
private $state;
private $isDefault;
public function __construct($userId, $name, $alias, $address, $address2, $postalCode, $city, $country, $state, $isDefault)
public function __construct($userId, $name, $address, $address2, $postalCode, $city, $country, $state)
{
$this->userId = $userId;
$this->name = $name;
$this->alias = $alias;
$this->address = $address;
$this->address2 = $address2;
$this->postalCode = $postalCode;
$this->city = $city;
$this->country = $country;
$this->state = $state;
$this->isDefault = $isDefault;
}
public function getUserId()
......@@ -40,11 +36,6 @@ class AddressCreateCommand
return $this->name;
}
public function getAlias()
{
return $this->alias;
}
public function getAddress()
{
return $this->address;
......@@ -74,9 +65,4 @@ class AddressCreateCommand
{
return $this->state;
}
public function isDefault()
{
return $this->isDefault;
}
}
<?php
namespace LQDN\Command;
class AddressUpdateCommand
{
private $addressId;
private $userId;
private $alias;
private $address;
private $address2;
private $postalCode;
private $city;
private $country;
private $state;
private $isDefault;
public function __construct($addressId, $userId, $alias, $address, $address2, $postalCode, $city, $country, $state, $isDefault)
{
$this->addressId = $addressId;
$this->userId = $userId;
$this->alias = $alias;
$this->address = $address;
$this->address2 = $address2;
$this->postalCode = $postalCode;
$this->city = $city;
$this->country = $country;
$this->state = $state;
$this->isDefault = $isDefault;
}
public function getAddressId()
{
return $this->addressId;
}
public function getUserId()
{
return $this->userId;
}
public function getAlias()
{
return $this->alias;
}
public function getAddress()
{
return $this->address;
}
public function getAddress2()
{
return $this->address2;
}
public function getPostalCode()
{
return $this->postalCode;
}
public function getCity()
{
return $this->city;
}
public function getCountry()
{
return $this->country;
}
public