package dto

// UpdateKundaliRequest edits a kundali that is already saved.
//
// Every field is optional. A field left out, or sent empty, keeps the value the
// row already has — an app that only fixes a spelling posts only the name. The
// coordinates and the timezone are pointers so that a deliberate 0 can be told
// apart from "not sent".
type UpdateKundaliRequest struct {
	Name       string   `json:"name"`
	Gender     string   `json:"gender"`
	BirthDate  string   `json:"birthDate"`
	BirthTime  string   `json:"birthTime"`
	BirthPlace string   `json:"birthPlace"`
	Latitude   *float64 `json:"latitude"`
	Longitude  *float64 `json:"longitude"`
	Timezone   *string  `json:"timezone"`

	// Chart options, named as on the generate call.
	Lang      string `json:"lang"`
	PdfType   string `json:"pdf_type"`
	MatchType string `json:"match_type"`
	ForMatch  *bool  `json:"forMatch"`

	// Sections, SkipPDF and VendorPDF mean what they mean on
	// AddKundaliRequest, and apply only when the edit recasts the chart.
	Sections  []string `json:"sections"`
	SkipPDF   bool     `json:"skip_pdf"`
	VendorPDF bool     `json:"vendor_pdf"`

	// Regenerate forces a fresh cast even when nothing the chart depends on
	// changed. Without it a cosmetic edit makes no upstream call.
	Regenerate bool `json:"regenerate"`
}
