package customer import ( "time" apiKafka "git.slaventius.ru/test3k/umate/pkg/kafka" ) // Покупатель type Customer struct { SimpleRow Login string Password string Confirmed bool apiKafka.MessageRegistration Time time.Time } func (c *Customer) Update() error { _, err := c.collection.UpdateDocument(c.ctx, c.key, c) return err } func (c *Customer) Delete() error { return c.SimpleRow.Delete() } func (c *Customer) Refresh() error { c.Time = time.Now().Add(time.Minute * 15) return c.Update() } func (c *Customer) Confirm() error { c.Confirmed = true return c.Update() }