func (this *Board) Copy(entity *Board) { if entity != nil { this.EntityAudit.Copy(entity.EntityAudit) // attributes this.Name = app.CopyString(entity.Name) this.Description = app.CopyString(entity.Description) // associations this.Lanes = make([]*Lane, len(entity.Lanes), cap(entity.Lanes)) copy(this.Lanes, entity.Lanes) this.Users = make([]*User, len(entity.Users), cap(entity.Users)) copy(this.Users, entity.Users) } }
func (this *User) Copy(entity *User) { if entity != nil { this.EntityAudit.Copy(entity.EntityAudit) // attributes this.Name = app.CopyString(entity.Name) this.Username = app.CopyString(entity.Username) this.Password = app.CopyString(entity.Password) // associations this.Boards = make([]*Board, len(entity.Boards), cap(entity.Boards)) copy(this.Boards, entity.Boards) this.Roles = make([]*Role, len(entity.Roles), cap(entity.Roles)) copy(this.Roles, entity.Roles) this.Tasks = make([]*Task, len(entity.Tasks), cap(entity.Tasks)) copy(this.Tasks, entity.Tasks) } }
func (this *Task) Copy(entity *Task) { if entity != nil { this.EntityAudit.Copy(entity.EntityAudit) // attributes this.Title = app.CopyString(entity.Title) this.Detail = app.CopyString(entity.Detail) this.HeadColor = app.CopyString(entity.HeadColor) this.BodyColor = app.CopyString(entity.BodyColor) this.Position = app.CopyInteger(entity.Position) this.Reference = app.CopyString(entity.Reference) this.Spent = app.CopyInteger(entity.Spent) this.Remaining = app.CopyInteger(entity.Remaining) // associations this.User = entity.User this.Lane = entity.Lane this.Notifications = make([]*Notification, len(entity.Notifications), cap(entity.Notifications)) copy(this.Notifications, entity.Notifications) } }
func (this *Lane) Copy(entity *Lane) { if entity != nil { this.EntityAudit.Copy(entity.EntityAudit) // attributes this.Name = app.CopyString(entity.Name) this.Position = app.CopyInteger(entity.Position) // associations this.Board = entity.Board this.Tasks = make([]*Task, len(entity.Tasks), cap(entity.Tasks)) copy(this.Tasks, entity.Tasks) this.Notifications = make([]*Notification, len(entity.Notifications), cap(entity.Notifications)) copy(this.Notifications, entity.Notifications) } }