init push
This commit is contained in:
70
internal/transport/http/dto/request/helicopter_request.go
Normal file
70
internal/transport/http/dto/request/helicopter_request.go
Normal file
@@ -0,0 +1,70 @@
|
||||
package request
|
||||
|
||||
import "wucher/internal/transport/http/dto"
|
||||
|
||||
type HelicopterCreateAttributes struct {
|
||||
Designation string `json:"designation" validate:"required" example:"OE-XHZ"`
|
||||
Identifier string `json:"identifier" validate:"required" example:"ABC"`
|
||||
Type string `json:"type" validate:"required" example:"EC-135"`
|
||||
SortKey *int `json:"sortkey" example:"10"`
|
||||
Engine1 *string `json:"engine_1,omitempty" example:"TM"`
|
||||
Engine2 *string `json:"engine_2,omitempty" example:"TM"`
|
||||
Consumption *float64 `json:"consumption_lt_min,omitempty" example:"4.1"`
|
||||
NR1 *bool `json:"nr1,omitempty" example:"true"`
|
||||
NR2 *bool `json:"nr2,omitempty" example:"true"`
|
||||
LH *bool `json:"lh,omitempty" example:"true"`
|
||||
RH *bool `json:"rh,omitempty" example:"true"`
|
||||
MGB *bool `json:"mgb,omitempty" example:"true"`
|
||||
IGB *bool `json:"igb,omitempty" example:"false"`
|
||||
TGB *bool `json:"tgb,omitempty" example:"true"`
|
||||
UTCOffset *int `json:"utc_offset,omitempty" example:"-1"`
|
||||
FileUUID *string `json:"file_uuid,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e90"`
|
||||
Dry *bool `json:"dry,omitempty" example:"false"`
|
||||
AOG *bool `json:"aog,omitempty" example:"false"`
|
||||
AOGReason *string `json:"aog_reason,omitempty" example:"Main rotor gearbox fault"`
|
||||
Note *string `json:"note,omitempty" example:"Primary HEMS helicopter"`
|
||||
IsActive *bool `json:"is_active,omitempty" example:"true"`
|
||||
}
|
||||
|
||||
type HelicopterCreateData struct {
|
||||
Type string `json:"type" validate:"required,oneof=helicopter_create helicopter" example:"helicopter_create"`
|
||||
Attributes HelicopterCreateAttributes `json:"attributes" validate:"required"`
|
||||
}
|
||||
|
||||
type HelicopterCreateRequest struct {
|
||||
Data HelicopterCreateData `json:"data" validate:"required"`
|
||||
}
|
||||
|
||||
type HelicopterUpdateAttributes struct {
|
||||
Designation *string `json:"designation,omitempty" example:"OE-XHZ"`
|
||||
Identifier *string `json:"identifier,omitempty" example:"ABC"`
|
||||
Type *string `json:"type,omitempty" example:"EC-135"`
|
||||
SortKey dto.NullInt `json:"sortkey,omitempty" swaggertype:"integer" example:"10"`
|
||||
Engine1 *string `json:"engine_1,omitempty" example:"TM"`
|
||||
Engine2 *string `json:"engine_2,omitempty" example:"TM"`
|
||||
Consumption *float64 `json:"consumption_lt_min,omitempty" example:"4.1"`
|
||||
NR1 *bool `json:"nr1,omitempty" example:"true"`
|
||||
NR2 *bool `json:"nr2,omitempty" example:"true"`
|
||||
LH *bool `json:"lh,omitempty" example:"true"`
|
||||
RH *bool `json:"rh,omitempty" example:"true"`
|
||||
MGB *bool `json:"mgb,omitempty" example:"true"`
|
||||
IGB *bool `json:"igb,omitempty" example:"false"`
|
||||
TGB *bool `json:"tgb,omitempty" example:"true"`
|
||||
UTCOffset *int `json:"utc_offset,omitempty" example:"-1"`
|
||||
FileUUID *string `json:"file_uuid,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e90"`
|
||||
Dry *bool `json:"dry,omitempty" example:"false"`
|
||||
AOG *bool `json:"aog,omitempty" example:"false"`
|
||||
AOGReason *string `json:"aog_reason,omitempty" example:"Main rotor gearbox fault"`
|
||||
Note *string `json:"note,omitempty" example:"Primary HEMS helicopter"`
|
||||
IsActive *bool `json:"is_active,omitempty" example:"true"`
|
||||
}
|
||||
|
||||
type HelicopterUpdateData struct {
|
||||
Type string `json:"type" validate:"required,oneof=helicopter_update helicopter" example:"helicopter_update"`
|
||||
ID string `json:"id" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
|
||||
Attributes HelicopterUpdateAttributes `json:"attributes" validate:"required"`
|
||||
}
|
||||
|
||||
type HelicopterUpdateRequest struct {
|
||||
Data HelicopterUpdateData `json:"data" validate:"required"`
|
||||
}
|
||||
Reference in New Issue
Block a user