github.com/companieshouse/insolvency-api@v0.0.0-20231024103413-440c973d9e9b/models/request_entities.go (about) 1 package models 2 3 // InsolvencyRequest is the model that should be sent to the insolvency API when creating a new request. 4 type InsolvencyRequest struct { 5 CompanyNumber string `json:"company_number" validate:"required,alphanum"` 6 CompanyName string `json:"company_name" validate:"required"` 7 CaseType string `json:"case_type" validate:"required"` 8 } 9 10 // PractitionerRequest is the model that should be sent when creating a new insolvency practitioner 11 type PractitionerRequest struct { 12 IPCode string `json:"ip_code" validate:"required,number,max=8"` 13 FirstName string `json:"first_name" validate:"required"` 14 LastName string `json:"last_name" validate:"required"` 15 TelephoneNumber string `json:"telephone_number" validate:"omitempty"` 16 Email string `json:"email" validate:"omitempty,email"` 17 Address Address `json:"address" validate:"required"` 18 Role string `json:"role" validate:"required"` 19 } 20 21 // Address is the model to represent any addresses within the insolvency service 22 type Address struct { 23 Premises string `json:"premises" validate:"required"` 24 AddressLine1 string `json:"address_line_1" validate:"required"` 25 AddressLine2 string `json:"address_line_2"` 26 Country string `json:"country"` 27 Locality string `json:"locality" validate:"required"` 28 Region string `json:"region"` 29 PostalCode string `json:"postal_code" validate:"required"` 30 POBox string `json:"po_box"` 31 } 32 33 // PractitionerAppointment is the model to represent appointment data for a practitioner 34 type PractitionerAppointment struct { 35 AppointedOn string `json:"appointed_on" validate:"required,datetime=2006-01-02"` 36 MadeBy string `json:"made_by" validate:"required"` 37 } 38 39 // Attachment is the model to represent an attachment for an insolvency case 40 type Attachment struct { 41 AttachmentType string `json:"attachment_type"` 42 File string `json:"file"` 43 } 44 45 // Resolution is the model to represent a resolution for an insolvency case 46 type Resolution struct { 47 DateOfResolution string `json:"date_of_resolution" validate:"required,datetime=2006-01-02"` 48 Attachments []string `json:"attachments" validate:"required"` 49 } 50 51 // StatementOfAffairs is the model to represent a resolution for an insolvency case 52 type StatementOfAffairs struct { 53 StatementDate string `json:"statement_date" validate:"required,datetime=2006-01-02"` 54 Attachments []string `json:"attachments" validate:"required"` 55 } 56 57 // ProgressReport is the model to represent a progress report for an insolvency case 58 type ProgressReport struct { 59 FromDate string `json:"from_date" validate:"required,datetime=2006-01-02"` 60 ToDate string `json:"to_date" validate:"required,datetime=2006-01-02"` 61 Attachments []string `json:"attachments" validate:"required"` 62 }