| | 1 | | using MUNity.Database.Models.Conference; |
| | 2 | |
|
| | 3 | | namespace MUNity.Database.FluentAPI; |
| | 4 | |
|
| | 5 | | public class CommitteeTopicOptionsBuilder |
| | 6 | | { |
| 88 | 7 | | public CommitteeTopic Topic { get; } |
| | 8 | |
|
| | 9 | | public CommitteeTopicOptionsBuilder WithName(string name) |
| 22 | 10 | | { |
| 22 | 11 | | if (string.IsNullOrEmpty(Topic.TopicFullName)) |
| 22 | 12 | | Topic.TopicFullName = name; |
| | 13 | |
|
| 22 | 14 | | Topic.TopicName = name; |
| 22 | 15 | | return this; |
| 22 | 16 | | } |
| | 17 | |
|
| | 18 | | public CommitteeTopicOptionsBuilder WithFullName(string fullName) |
| 0 | 19 | | { |
| 0 | 20 | | if (string.IsNullOrWhiteSpace(Topic.TopicName)) |
| 0 | 21 | | Topic.TopicName = fullName; |
| | 22 | |
|
| 0 | 23 | | Topic.TopicFullName = fullName; |
| 0 | 24 | | return this; |
| 0 | 25 | | } |
| | 26 | |
|
| | 27 | | public CommitteeTopicOptionsBuilder WithDescription(string description) |
| 0 | 28 | | { |
| 0 | 29 | | Topic.TopicDescription = description; |
| 0 | 30 | | return this; |
| 0 | 31 | | } |
| | 32 | |
|
| | 33 | | public CommitteeTopicOptionsBuilder WithCode(string code) |
| 0 | 34 | | { |
| 0 | 35 | | Topic.TopicCode = code; |
| 0 | 36 | | return this; |
| 0 | 37 | | } |
| | 38 | |
|
| 22 | 39 | | public CommitteeTopicOptionsBuilder() |
| 22 | 40 | | { |
| 22 | 41 | | this.Topic = new CommitteeTopic(); |
| 22 | 42 | | } |
| | 43 | | } |