src/model + src/schema: removed mandatory fields

pull/23/head
leonnicolas 4 years ago
parent 1edf15ca24
commit 2c8a5ea6b7
No known key found for this signature in database
GPG Key ID: 088D0743E2B65C07

@ -90,13 +90,19 @@ export class Security {
adfcCoding: string; adfcCoding: string;
} }
export class TechnicalEquipment { export class TechnicalEquipment {
@Column() @Column({
nullable: true
})
bicycleShift: string; bicycleShift: string;
@Column() @Column({
nullable: true
})
isEBike: boolean; isEBike: boolean;
@Column() @Column({
nullable: true
})
hasLightSystem: boolean; hasLightSystem: boolean;
@Column({ @Column({
@ -106,10 +112,14 @@ export class TechnicalEquipment {
} }
export class DimensionsAndLoad { export class DimensionsAndLoad {
@Column() @Column({
nullable: true
})
hasCoverBox: boolean; hasCoverBox: boolean;
@Column() @Column({
nullable: true
})
lockable:boolean; lockable:boolean;
@Column({ @Column({

@ -42,9 +42,7 @@ export class ContactInformation implements Lockable {
}) })
participantId: number; participantId: number;
@Column(type => { @Column(type => { return Address; })
return Address;
})
address: Address; address: Address;
@Column({ @Column({

@ -20,22 +20,34 @@ This file is part of fLotte-API-Server.
import { Column } from 'typeorm'; import { Column } from 'typeorm';
export class InsuranceData { export class InsuranceData {
@Column() @Column({
nullable: true
})
name: string; name: string;
@Column() @Column({
nullable: true
})
benefactor: string; benefactor: string;
@Column() @Column({
nullable: true
})
billing: string; billing: string;
@Column() @Column({
nullable: true
})
noPnP: string; noPnP: string;
@Column() @Column({
nullable: true
})
maintenanceResponsible: string; maintenanceResponsible: string;
@Column() @Column({
nullable: true
})
maintenanceBenefactor: string; maintenanceBenefactor: string;
@Column({ @Column({

@ -25,7 +25,9 @@ export enum OrganisationArea {
ZB = 'ZB' ZB = 'ZB'
} }
export class Taxes { export class Taxes {
@Column() @Column({
nullable: true
})
costCenter: string; costCenter: string;
@Column({ @Column({

@ -56,7 +56,7 @@ export default gql`
""" """
Does not refer to an extra table in the database. Does not refer to an extra table in the database.
""" """
dimensionsAndLoad: DimensionsAndLoad! dimensionsAndLoad: DimensionsAndLoad
"If offset or limit is not provided, both values are ignored" "If offset or limit is not provided, both values are ignored"
bikeEvents(offset: Int, limit: Int): [BikeEvent] bikeEvents(offset: Int, limit: Int): [BikeEvent]
"If offset or limit is not provided, both values are ignored" "If offset or limit is not provided, both values are ignored"
@ -69,7 +69,7 @@ export default gql`
provider: Provider provider: Provider
"all participants currently engaged with the cargoBike" "all participants currently engaged with the cargoBike"
participants: [Participant] participants: [Participant]
insuranceData: InsuranceData! insuranceData: InsuranceData
lendingStation: LendingStation lendingStation: LendingStation
taxes: Taxes taxes: Taxes
currentEngagements: [Engagement] currentEngagements: [Engagement]
@ -102,11 +102,11 @@ export default gql`
""" """
Does not refer to an extra table in the database. Does not refer to an extra table in the database.
""" """
technicalEquipment: TechnicalEquipmentCreateInput! technicalEquipment: TechnicalEquipmentCreateInput
""" """
Does not refer to an extra table in the database. Does not refer to an extra table in the database.
""" """
dimensionsAndLoad: DimensionsAndLoadCreateInput! dimensionsAndLoad: DimensionsAndLoadCreateInput
""" """
Refers to equipment that is not unique. See kommentierte info tabelle -> Fragen -> Frage 2 Refers to equipment that is not unique. See kommentierte info tabelle -> Fragen -> Frage 2
When set to null or [], no relations will be added. When set to null or [], no relations will be added.
@ -122,8 +122,8 @@ export default gql`
stickerBikeNameState: StickerBikeNameState stickerBikeNameState: StickerBikeNameState
note: String note: String
providerId: ID providerId: ID
insuranceData: InsuranceDataCreateInput! insuranceData: InsuranceDataCreateInput
taxes: TaxesCreateInput! taxes: TaxesCreateInput
} }
""" """
@ -180,15 +180,15 @@ export default gql`
""" """
Eventually, this field will become an enum or a separate data table and user can choose from a pool of insurance companies. Eventually, this field will become an enum or a separate data table and user can choose from a pool of insurance companies.
""" """
name: String! name: String
benefactor: String! benefactor: String
billing: String! billing: String
noPnP: String! noPnP: String
"eg. Anbieter, flotte, eigenleistung" "eg. Anbieter, flotte, eigenleistung"
maintenanceResponsible: String! maintenanceResponsible: String
maintenanceBenefactor: String! maintenanceBenefactor: String
maintenanceAgreement: String maintenanceAgreement: String
hasFixedRate: Boolean! hasFixedRate: Boolean
fixedRate: Float fixedRate: Float
""" """
Projektzuschuss: Projektzuschuss:
@ -206,15 +206,15 @@ export default gql`
""" """
Eventually, this field will become an enum or a separate data table and user can choose from a pool of insurance companies. Eventually, this field will become an enum or a separate data table and user can choose from a pool of insurance companies.
""" """
name: String! name: String
benefactor: String! benefactor: String
billing: String! billing: String
noPnP: String! noPnP: String
"eg. Anbieter, flotte, eigenleistung" "eg. Anbieter, flotte, eigenleistung"
maintenanceResponsible: String! maintenanceResponsible: String
maintenanceBenefactor: String! maintenanceBenefactor: String
maintenanceAgreement: String maintenanceAgreement: String
hasFixedRate: Boolean! hasFixedRate: Boolean
fixedRate: Float fixedRate: Float
""" """
Projektzuschuss: Projektzuschuss:
@ -256,9 +256,9 @@ export default gql`
"How are the dimensions and how much weight can handle a bike. This data is merged in the CargoBike table and the BikeModel table." "How are the dimensions and how much weight can handle a bike. This data is merged in the CargoBike table and the BikeModel table."
type DimensionsAndLoad { type DimensionsAndLoad {
hasCoverBox: Boolean! hasCoverBox: Boolean
"cover box can be locked" "cover box can be locked"
lockable: Boolean! lockable: Boolean
minBoxLength: Float minBoxLength: Float
maxBoxLength: Float maxBoxLength: Float
minBoxWidth: Float minBoxWidth: Float
@ -275,8 +275,8 @@ export default gql`
} }
input DimensionsAndLoadCreateInput { input DimensionsAndLoadCreateInput {
hasCoverBox: Boolean! hasCoverBox: Boolean
lockable: Boolean! lockable: Boolean
minBoxLength: Float minBoxLength: Float
maxBoxLength: Float maxBoxLength: Float
minBoxWidth: Float minBoxWidth: Float
@ -316,16 +316,16 @@ export default gql`
So no id needed for mutation. One Mutation for the CargoBike will be enough. So no id needed for mutation. One Mutation for the CargoBike will be enough.
""" """
type TechnicalEquipment { type TechnicalEquipment {
bicycleShift: String! bicycleShift: String
isEBike: Boolean! isEBike: Boolean
hasLightSystem: Boolean! hasLightSystem: Boolean
specialFeatures: String specialFeatures: String
} }
input TechnicalEquipmentCreateInput { input TechnicalEquipmentCreateInput {
bicycleShift: String! bicycleShift: String
isEBike: Boolean! isEBike: Boolean
hasLightSystem: Boolean! hasLightSystem: Boolean
specialFeatures: String specialFeatures: String
} }
@ -563,12 +563,12 @@ export default gql`
} }
type Taxes { type Taxes {
costCenter: String! costCenter: String
organisationArea: OrganisationArea organisationArea: OrganisationArea
} }
input TaxesCreateInput { input TaxesCreateInput {
costCenter: String! costCenter: String
organisationArea: OrganisationArea organisationArea: OrganisationArea
} }
@ -643,7 +643,7 @@ export default gql`
keepLock: Boolean keepLock: Boolean
} }
"An Event is a point in time, when the state of the bike somehow changed." "An Event is a point in time concerning one cargo bike of an event type. For example a chain swap."
type BikeEvent { type BikeEvent {
id: ID! id: ID!
bikeEventType: BikeEventType! bikeEventType: BikeEventType!

Loading…
Cancel
Save