Last active
June 20, 2023 13:45
-
-
Save maiconheck/11cef28501cc0fae5568470c86f0c75b to your computer and use it in GitHub Desktop.
[3º Improvement]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Lead | |
{ | |
public Lead(string name, string email) | |
{ | |
Name = name; | |
Email = email; | |
_segments = new List<Segment>(); | |
} | |
public string Name { get; } | |
public string Email { get; } | |
private readonly List<Segment> _segments; | |
public IReadOnlyList<Segment> Segments => _segments.ToList(); | |
public string PhoneNumber { get; private set; } | |
public string Address { get; private set; } | |
public bool? Gender { get; private set; } | |
public DateTime? BirthDate { get; private set; } | |
public void CompleteInfo(string phoneNumber, string address, bool gender, DateTime birthDate) | |
{ | |
PhoneNumber = phoneNumber; | |
Address = address; | |
Gender = gender; | |
BirthDate = birthDate; | |
} | |
public void AddSegment(Segment segment) | |
{ | |
_segments.Add(segment); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment