public override int GetHashCode() { int hashCode = -1821243729; if (TeamMemberId != null) { hashCode += TeamMemberId.GetHashCode(); } if (Description != null) { hashCode += Description.GetHashCode(); } if (DisplayName != null) { hashCode += DisplayName.GetHashCode(); } if (IsBookable != null) { hashCode += IsBookable.GetHashCode(); } if (ProfileImageUrl != null) { hashCode += ProfileImageUrl.GetHashCode(); } return(hashCode); }
public TeamMember TeamMemberOfIdentified(TeamMemberId teamMemberId) { using var conn = _provider.GetConnection(); var sql = $@" select tenant_id as {nameof(TeamMemberDTO.TenantId)}, username as {nameof(TeamMemberDTO.Username)}, first_name as {nameof(TeamMemberDTO.FirstName)}, last_name as {nameof(TeamMemberDTO.LastName)}, email_address as {nameof(TeamMemberDTO.EmailAddress)}, enabled as {nameof(TeamMemberDTO.Enabled)}, email_address_update_timestamp as {nameof(TeamMemberDTO.EmailAddressUpdateTimestamp)}, enabling_toggle_timestamp as {nameof(TeamMemberDTO.EnablingToggleTimestamp)}, name_update_timestamp as {nameof(TeamMemberDTO.NameUpdateTimestamp)} from tbl_team_member where tenant_id = @TenantId and username = @Username; "; var teamMemberDTO = conn.QueryFirst <TeamMemberDTO>(sql, new { TenantId = teamMemberId.TenantId.Id, teamMemberId.Id }); return(new TeamMember(new TenantId(teamMemberDTO.TenantId), teamMemberDTO.Username, teamMemberDTO.LastName, teamMemberDTO.FirstName, teamMemberDTO.EmailAddress, new MemberChangeTracker(teamMemberDTO.EmailAddressUpdateTimestamp, teamMemberDTO.EnablingToggleTimestamp, teamMemberDTO.NameUpdateTimestamp))); }
public override int GetHashCode() { int hashCode = 2085057343; if (Id != null) { hashCode += Id.GetHashCode(); } if (TeamMemberId != null) { hashCode += TeamMemberId.GetHashCode(); } if (Title != null) { hashCode += Title.GetHashCode(); } if (HourlyRate != null) { hashCode += HourlyRate.GetHashCode(); } return(hashCode); }
public void AppointChairman(TeamId teamId, TeamMemberId teamMemberId) { var team = _teamRepository.Get(teamId); var teamMember = _teamMemberRepository.Get(teamMemberId); var chairmanship = team.AppointChairman(teamMember); _teamChairmanshipRepository.Add(chairmanship); }
public void AppointChairman(TeamId teamId, TeamMemberId teamMemberId) { var team = _teamRepository.Get(teamId); var teamMember = _teamMemberRepository.Get(teamMemberId); Enforce.That(teamMember.IsPartOf(team.Id), Sorry.NotPartOfTheTeam); Enforce.That(teamMember.IsMemberSinceAtLeastTwoYears(), Sorry.NotMemberSinceAtLeastTwoYears); team.SetNewChairman(teamMember.Id); }
public void AppointChairman(TeamId teamId, TeamMemberId teamMemberId) { var team = _teamRepository.Get(teamId); var teamMember = _teamMemberRepository.Get(teamMemberId); Enforce.That(teamMember.IsPartOf(team.Id), Sorry.NotPartOfTheTeam); Enforce.That(teamMember.IsMemberSinceAtLeastTwoYears(), Sorry.NotMemberSinceAtLeastTwoYears); team.SetNewChairman(teamMember.Id); }
public void AppointChairman(TeamId teamId, TeamMemberId teamMemberId) { var team = _teamRepository.Get(teamId); var teamMember = _teamMemberRepository.Get(teamMemberId); var chairmanship = team.AppointChairman(teamMember); _teamChairmanshipRepository.Add(chairmanship); }
public void AppointChairman(TeamId teamId, TeamMemberId teamMemberId) { var team = _teamRepository.Get(teamId); var teamMember = _teamMemberRepository.Get(teamMemberId); teamMember.MustBePartOfTheTeam(team.Id); teamMember.MustBeAMemberForAtLeastTwoYears(); team.SetNewChairman(teamMember.Id); }
public void AppointChairman(TeamId teamId, TeamMemberId teamMemberId) { var team = _teamRepository.Get(teamId); var teamMember = _teamMemberRepository.Get(teamMemberId); teamMember.MustBePartOfTheTeam(team.Id); teamMember.MustBeAMemberForAtLeastTwoYears(); team.SetNewChairman(teamMember.Id); }
public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj == this) { return(true); } return(obj is ListTeamMemberWagesRequest other && ((TeamMemberId == null && other.TeamMemberId == null) || (TeamMemberId?.Equals(other.TeamMemberId) == true)) && ((Limit == null && other.Limit == null) || (Limit?.Equals(other.Limit) == true)) && ((Cursor == null && other.Cursor == null) || (Cursor?.Equals(other.Cursor) == true))); }
public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj == this) { return(true); } return(obj is AppointmentSegment other && DurationMinutes.Equals(other.DurationMinutes) && ((ServiceVariationId == null && other.ServiceVariationId == null) || (ServiceVariationId?.Equals(other.ServiceVariationId) == true)) && ((TeamMemberId == null && other.TeamMemberId == null) || (TeamMemberId?.Equals(other.TeamMemberId) == true)) && ServiceVariationVersion.Equals(other.ServiceVariationVersion)); }
public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj == this) { return(true); } return(obj is TeamMemberWage other && ((Id == null && other.Id == null) || (Id?.Equals(other.Id) == true)) && ((TeamMemberId == null && other.TeamMemberId == null) || (TeamMemberId?.Equals(other.TeamMemberId) == true)) && ((Title == null && other.Title == null) || (Title?.Equals(other.Title) == true)) && ((HourlyRate == null && other.HourlyRate == null) || (HourlyRate?.Equals(other.HourlyRate) == true))); }
public override int GetHashCode() { int hashCode = -1009100920; hashCode += DurationMinutes.GetHashCode(); if (ServiceVariationId != null) { hashCode += ServiceVariationId.GetHashCode(); } if (TeamMemberId != null) { hashCode += TeamMemberId.GetHashCode(); } hashCode += ServiceVariationVersion.GetHashCode(); return(hashCode); }
public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj == this) { return(true); } return(obj is TeamMemberBookingProfile other && ((TeamMemberId == null && other.TeamMemberId == null) || (TeamMemberId?.Equals(other.TeamMemberId) == true)) && ((Description == null && other.Description == null) || (Description?.Equals(other.Description) == true)) && ((DisplayName == null && other.DisplayName == null) || (DisplayName?.Equals(other.DisplayName) == true)) && ((IsBookable == null && other.IsBookable == null) || (IsBookable?.Equals(other.IsBookable) == true)) && ((ProfileImageUrl == null && other.ProfileImageUrl == null) || (ProfileImageUrl?.Equals(other.ProfileImageUrl) == true))); }
public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj == this) { return(true); } return(obj is WageSetting other && ((TeamMemberId == null && other.TeamMemberId == null) || (TeamMemberId?.Equals(other.TeamMemberId) == true)) && ((JobAssignments == null && other.JobAssignments == null) || (JobAssignments?.Equals(other.JobAssignments) == true)) && ((IsOvertimeExempt == null && other.IsOvertimeExempt == null) || (IsOvertimeExempt?.Equals(other.IsOvertimeExempt) == true)) && ((Version == null && other.Version == null) || (Version?.Equals(other.Version) == true)) && ((CreatedAt == null && other.CreatedAt == null) || (CreatedAt?.Equals(other.CreatedAt) == true)) && ((UpdatedAt == null && other.UpdatedAt == null) || (UpdatedAt?.Equals(other.UpdatedAt) == true))); }
public override int GetHashCode() { int hashCode = 1771115446; if (TeamMemberId != null) { hashCode += TeamMemberId.GetHashCode(); } if (Limit != null) { hashCode += Limit.GetHashCode(); } if (Cursor != null) { hashCode += Cursor.GetHashCode(); } return(hashCode); }
public override int GetHashCode() { int hashCode = -742786902; if (TeamMemberId != null) { hashCode += TeamMemberId.GetHashCode(); } if (JobAssignments != null) { hashCode += JobAssignments.GetHashCode(); } if (IsOvertimeExempt != null) { hashCode += IsOvertimeExempt.GetHashCode(); } if (Version != null) { hashCode += Version.GetHashCode(); } if (CreatedAt != null) { hashCode += CreatedAt.GetHashCode(); } if (UpdatedAt != null) { hashCode += UpdatedAt.GetHashCode(); } return(hashCode); }
public TeamMember Get(TeamMemberId id) { return(_storage[id]); }
protected bool Equals(TeamMemberId other) { return _value == other._value; }
public TeamChairmanship(TeamId teamId, TeamMemberId teamMemberId, DateTime starting) { _teamId = teamId; _teamMemberId = teamMemberId; _starting = starting; }
public TeamMember(TeamId teamId, TeamMemberId teamMemberId, DateTime joinDate) { _teamId = teamId; _teamMemberId = teamMemberId; _joinDate = joinDate; }
public void AppointChairman(TeamMember member) { member.GuardAppointmentAsChairman(_teamId); _chairman = member.Id; }
internal void SetChairman(TeamMemberId teamMemberId) { Enforce.That(HasMember(teamMemberId), Sorry.NotPartOfTheTeam); _chairman = teamMemberId; }
public void AppointChairman(TeamMember member) { member.GuardAppointmentAsChairman(_teamId); _chairman = member.Id; }
public void AddMember(TeamMemberId memberId) { _memberIds.Add(memberId); }
internal void SetChairman(TeamMemberId teamMemberId) { Enforce.That(HasMember(teamMemberId), Sorry.NotPartOfTheTeam); _chairman = teamMemberId; }
public override bool Equals(object other) { return(other is TeamMember otherTeamMember && TeamMemberId.Equals(otherTeamMember.TeamMemberId)); }
public override int GetHashCode() { return(TeamMemberId.GetHashCode()); }
protected bool Equals(TeamMemberId other) { return(_value == other._value); }
public void AppointAsChairman(TeamMember member) { Enforce.That(member.IsPartOf(_teamId), Sorry.NotPartOfTheTeam); Enforce.That(member.IsMemberSinceAtLeastTwoYears(), Sorry.NotMemberSinceAtLeastTwoYears); _chairman = member.TeamMemberId; }
internal void SetChairman(TeamMemberId teamMemberId) { _chairman = teamMemberId; }
public void AddMember(TeamMemberId memberId) { _memberIds.Add(memberId); }
bool HasMember(TeamMemberId teamMemberId) { return _memberIds.Contains(teamMemberId); }
bool HasMember(TeamMemberId teamMemberId) { return(_memberIds.Contains(teamMemberId)); }
public void SetNewChairman(TeamMemberId id) { _chairmanId = id; }
public TeamMember Get(TeamMemberId id) { return _storage[id]; }
public void SetNewChairman(TeamMemberId id) { _chairmanId = id; }
public TeamChairmanship(TeamId teamId, TeamMemberId teamMemberId, DateTime starting) { _teamId = teamId; _teamMemberId = teamMemberId; _starting = starting; }
public TeamMember(TeamId teamId, TeamMemberId teamMemberId, DateTime joinDate) { _teamId = teamId; _teamMemberId = teamMemberId; _joinDate = joinDate; }
public void AppointAsChairman(TeamMember member) { Enforce.That(member.IsPartOf(_teamId), Sorry.NotPartOfTheTeam); Enforce.That(member.IsMemberSinceAtLeastTwoYears(), Sorry.NotMemberSinceAtLeastTwoYears); _chairman = member.TeamMemberId; }
internal void SetChairman(TeamMemberId teamMemberId) { _chairman = teamMemberId; }