// GetTO returns its Transfer Object
180688
func (u *UserFollower) GetTO(users ...*User) *UserFollowerTO {
	var fromInfo, toInfo *InfoTO
	if from, e := NewUser(u.From); e == nil {
		fromInfo = from.Info().GetTO()
	}
	if to, e := NewUser(u.To); e == nil {
		toInfo = to.Info().GetTO()
	}
	return &UserFollowerTO{
		original:  u,
		FromInfo:  fromInfo,
		ToInfo:    toInfo,
		Time:      u.Time,
		Timestamp: u.Time.Unix(),
		ToNotify:  u.ToNotify,
		Counter:   u.Counter,
	}
}
1235959
func (m *ProjectMember) GetTO(users ...*User) *ProjectMemberTO {
	var fromInfo, toInfo *InfoTO
	if from, e := NewUser(m.From); e == nil {
		fromInfo = from.Info().GetTO()
	}
	if to, e := NewProject(m.To); e == nil {
		toInfo = to.Info().GetTO()
	}
	return &ProjectMemberTO{
		original:  m,
		FromInfo:  fromInfo,
		ToInfo:    toInfo,
		Time:      m.Time,
		Timestamp: m.Time.Unix(),
		ToNotify:  m.ToNotify,
		Counter:   m.Counter,
	}
}
443537
func (o *ProjectOwner) GetTO(users ...*User) *ProjectOwnerTO {
	var fromInfo, toInfo *InfoTO
	if from, e := NewUser(o.From); e == nil {
		fromInfo = from.Info().GetTO()
	}
	if to, e := NewProject(o.To); e == nil {
		toInfo = to.Info().GetTO()
	}
	return &ProjectOwnerTO{
		original:  o,
		FromInfo:  fromInfo,
		ToInfo:    toInfo,
		Time:      o.Time,
		Timestamp: o.Time.Unix(),
		ToNotify:  o.ToNotify,
		Counter:   o.Counter,
	}

}
598783
func (l *ListCheckRunsResults) GetTotal() int {
	if l == nil || l.Total == nil {
		return 0
	}
	return *l.Total
}
1345169
func (g *Gormigrate) MigrateTo(migrationID string) error {
	if err := g.checkIDExist(migrationID); err != nil {
		return err
	}
	return g.migrate(migrationID)
}
760890
func (ds *DestSme) SerializeTo(w io.Writer) error {
	_, err := w.Write(ds.Bytes())
	return err
}
417479
func (p *ProjectPostRevision) GetTO(users ...*User) *ProjectPostRevisionTO {
	return &ProjectPostRevisionTO{
		original:  p,
		Hpid:      p.Hpid,
		Message:   p.Message,
		Time:      p.Time,
		Timestamp: p.Time.Unix(),
		RevNo:     p.RevNo,
		Counter:   p.Counter,
	}
}
437358
func (u *SpecialUser) GetTO(users ...*User) *SpecialUserTO {
	return &SpecialUserTO{
		original: u,
		Role:     u.Role,
		Counter:  u.Counter,
	}
}
1333758
func (s *CreateExportTaskInput) SetTo(v int64) *CreateExportTaskInput {
	s.To = &v
	return s
}
1043143
func (i *IssuesSearchResult) GetTotal() int {
	if i == nil || i.Total == nil {
		return 0
	}
	return *i.Total
}
1320896
func (ms *MemSorters) CollectTo(part int, key, val sophie.SophieWriter) error {
	ms.RLock()
	sorter, ok := ms.sorters[part]
	ms.RUnlock()
	if !ok {
		ms.Lock()
		sorter, ok = ms.sorters[part]
		if !ok {
			sorter = &memSorter{}
			ms.sorters[part] = sorter
		}
		ms.Unlock()
	}
	sorter.Lock()
	defer sorter.Unlock()

	sorter.KeyOffs.Add(len(sorter.Buffer))
	key.WriteTo(&sorter.Buffer)
	sorter.ValOffs.Add(len(sorter.Buffer))
	val.WriteTo(&sorter.Buffer)
	sorter.ValEnds.Add(len(sorter.Buffer))

	return nil
}
491847
func (dasher *DashVertexConverter) MoveTo(x, y float64) {
	dasher.next.MoveTo(x, y)
	dasher.x, dasher.y = x, y
	dasher.distance = dasher.dashOffset
	dasher.currentDash = 0
}
330966
func (u *UserPostLock) GetTO(users ...*User) *UserPostLockTO {
	var userInfo *InfoTO
	if user, e := NewUser(u.User); e == nil {
		userInfo = user.Info().GetTO()
	}
	return &UserPostLockTO{
		original:  u,
		User:      userInfo,
		Hpid:      u.Hpid,
		Time:      u.Time,
		Timestamp: u.Time.Unix(),
		Counter:   u.Counter,
	}
}
1100235
func (u *User) GetTO(users ...*User) *UserTO {
	return &UserTO{
		original:         u,
		Counter:          u.Counter,
		Last:             u.Last,
		NotifyStory:      u.NotifyStory,
		Private:          u.Private,
		Lang:             u.Lang,
		Username:         u.Username,
		Name:             u.Name,
		Surname:          u.Surname,
		Gender:           u.Gender,
		BirthDate:        u.BirthDate,
		BoardLang:        u.BoardLang,
		Timezone:         u.Timezone,
		Viewonline:       u.Viewonline,
		RegistrationTime: u.RegistrationTime,
		Profile: ProfileTO{
			Counter:        u.Profile.Counter,
			Website:        u.Profile.Website,
			Quotes:         strings.Split(u.Profile.Quotes, "\n"),
			Biography:      u.Profile.Biography,
			Interests:      u.Interests(),
			Github:         u.Profile.Github,
			Skype:          u.Profile.Skype,
			Jabber:         u.Profile.Jabber,
			Yahoo:          u.Profile.Yahoo,
			Userscript:     u.Profile.Userscript,
			Template:       u.Profile.Template,
			MobileTemplate: u.Profile.MobileTemplate,
			Dateformat:     u.Profile.Dateformat,
			Facebook:       u.Profile.Facebook,
			Twitter:        u.Profile.Twitter,
			Steam:          u.Profile.Steam,
			Push:           u.Profile.Push,
			Pushregtime:    u.Profile.Pushregtime,
			Closed:         u.Profile.Closed,
		},
	}
}
258744
func (p *Pm) GetTO(users ...*User) *PmTO {
	if len(users) != 1 {
		panic("Pm.GetTO requires a user parameter")
	}
	user := users[0]

	var fromInfo, toInfo *InfoTO
	if from, e := NewUser(p.From); e == nil {
		fromInfo = from.Info().GetTO()
	}
	if to, e := NewUser(p.To); e == nil {
		toInfo = to.Info().GetTO()
	}
	return &PmTO{
		original:  p,
		Pmid:      p.Pmid,
		FromInfo:  fromInfo,
		ToInfo:    toInfo,
		Message:   p.Message,
		Lang:      p.Lang,
		ToRead:    p.ToRead,
		Time:      p.Time,
		Timestamp: p.Time.Unix(),
		CanDelete: user.CanDelete(p),
		CanEdit:   user.CanEdit(p),
	}
}
588048
func (v *Variable) SerializeTo(w io.Writer) error {
	_, err := w.Write(v.Bytes())
	return err
}
788778
func (bm *BlockMeta) MarshalTo(data []byte) (int, error) {
	bs, err := bm.Marshal()
	if err != nil {
		return -1, err
	}
	return copy(data, bs), nil
}