-
-
Notifications
You must be signed in to change notification settings - Fork 360
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
154 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
src/main/java/alfio/model/TicketReservationAdditionalInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/** | ||
* This file is part of alf.io. | ||
* | ||
* alf.io is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* alf.io is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with alf.io. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
package alfio.model; | ||
|
||
import ch.digitalfondue.npjt.ConstructorAnnotationRowMapper.Column; | ||
import lombok.Getter; | ||
|
||
import java.util.Optional; | ||
|
||
@Getter | ||
public class TicketReservationAdditionalInfo { | ||
|
||
private final String billingAddressCompany; | ||
private final String billingAddressLine1; | ||
private final String billingAddressLine2; | ||
private final String billingAddressZip; | ||
private final String billingAddressCity; | ||
private final Boolean validated; | ||
private final Boolean addCompanyBillingDetails; | ||
|
||
public TicketReservationAdditionalInfo(@Column("billing_address_company") String billingAddressCompany, | ||
@Column("billing_address_line1") String billingAddressLine1, | ||
@Column("billing_address_line2") String billingAddressLine2, | ||
@Column("billing_address_zip") String billingAddressZip, | ||
@Column("billing_address_city") String billingAddressCity, | ||
@Column("validated_for_overview") Boolean validated, | ||
@Column("add_company_billing_details") Boolean addCompanyBillingDetails) { | ||
this.billingAddressCompany = billingAddressCompany; | ||
this.billingAddressLine1 = billingAddressLine1; | ||
this.billingAddressLine2 = billingAddressLine2; | ||
this.billingAddressZip = billingAddressZip; | ||
this.billingAddressCity = billingAddressCity; | ||
this.validated = validated; | ||
this.addCompanyBillingDetails = addCompanyBillingDetails; | ||
} | ||
|
||
|
||
public boolean hasBeenValidated() { | ||
return Optional.ofNullable(validated).orElse(false); | ||
} | ||
|
||
public boolean hasAddCompanyBillingDetails() { | ||
return Optional.ofNullable(addCompanyBillingDetails).orElse(false); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
src/main/resources/alfio/db/PGSQL/V23_2.0.0.0__NEW_RESERVATION_FLOW.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
-- | ||
-- This file is part of alf.io. | ||
-- | ||
-- alf.io is free software: you can redistribute it and/or modify | ||
-- it under the terms of the GNU General Public License as published by | ||
-- the Free Software Foundation, either version 3 of the License, or | ||
-- (at your option) any later version. | ||
-- | ||
-- alf.io is distributed in the hope that it will be useful, | ||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
-- GNU General Public License for more details. | ||
-- | ||
-- You should have received a copy of the GNU General Public License | ||
-- along with alf.io. If not, see <http://www.gnu.org/licenses/>. | ||
-- | ||
|
||
alter table tickets_reservation add column billing_address_company varchar(512); | ||
alter table tickets_reservation add column billing_address_line1 varchar(512); | ||
alter table tickets_reservation add column billing_address_line2 varchar(512); | ||
alter table tickets_reservation add column billing_address_zip varchar(512); | ||
alter table tickets_reservation add column billing_address_city varchar(512); | ||
alter table tickets_reservation add column validated_for_overview boolean; | ||
alter table tickets_reservation add column add_company_billing_details boolean; | ||
|
||
|
||
drop view if exists reservation_and_ticket_and_tx; | ||
drop view if exists ticket_and_reservation_and_tx; | ||
alter table tickets_reservation alter column billing_address TYPE varchar(4096); |