Initial commit
This commit is contained in:
20
Groceries.Data/Lists/List.cs
Normal file
20
Groceries.Data/Lists/List.cs
Normal file
@ -0,0 +1,20 @@
|
||||
namespace Groceries.Data;
|
||||
|
||||
public class List
|
||||
{
|
||||
public List(Guid id, string name)
|
||||
{
|
||||
Id = id;
|
||||
Name = name;
|
||||
}
|
||||
|
||||
public List(string name) : this(default, name)
|
||||
{
|
||||
}
|
||||
|
||||
public Guid Id { get; init; }
|
||||
public DateTime UpdatedAt { get; set; }
|
||||
public string Name { get; set; }
|
||||
|
||||
public ICollection<ListItem>? Items { get; init; }
|
||||
}
|
20
Groceries.Data/Lists/ListItem.cs
Normal file
20
Groceries.Data/Lists/ListItem.cs
Normal file
@ -0,0 +1,20 @@
|
||||
namespace Groceries.Data;
|
||||
|
||||
public class ListItem
|
||||
{
|
||||
public ListItem(Guid id, Guid listId, string name)
|
||||
{
|
||||
Id = id;
|
||||
ListId = listId;
|
||||
Name = name;
|
||||
}
|
||||
|
||||
public ListItem(Guid listId, string name) : this(default, listId, name)
|
||||
{
|
||||
}
|
||||
|
||||
public Guid Id { get; init; }
|
||||
public Guid ListId { get; init; }
|
||||
public string Name { get; set; }
|
||||
public bool Completed { get; set; }
|
||||
}
|
Reference in New Issue
Block a user