Nicolai Ort c07c6aeeab
Some checks failed
continuous-integration/drone/push Build is failing
Fixed file broken in merge
2021-02-03 18:23:08 +01:00

51 lines
873 B
TypeScript

import {
IsString
} from "class-validator";
/**
* Defines the Address class.
* Implemented this way to prevent any formatting differences.
*/
export class Address {
/**
* The address's first line.
* Containing the street and house number.
*/
@IsString()
address1?: string;
/**
* The address's second line.
* Containing optional information.
*/
@IsString()
address2?: string;
/**
* The address's postal code.
* This will get checked against the postal code syntax for the configured country.
*/
@IsString()
postalcode: string;
/**
* The address's city.
*/
@IsString()
city: string;
/**
* The address's country.
*/
@IsString()
country: string;
public reset() {
this.address1 = null;
this.address2 = null;
this.city = null;
this.country = null;
this.postalcode = null;
}
}