30 lines
648 B
C#
30 lines
648 B
C#
|
using MongoDB.Bson.Serialization.Attributes;
|
|||
|
|
|||
|
namespace BeautySaloonNoSQLDatabaseImplement
|
|||
|
{
|
|||
|
public class ServiceOrder
|
|||
|
{
|
|||
|
[BsonElement("service")]
|
|||
|
public Service Service { get; set; }
|
|||
|
|
|||
|
[BsonElement("employee")]
|
|||
|
public Employee Employee { get; set; }
|
|||
|
|
|||
|
[BsonElement("time")]
|
|||
|
private string DateMongo { get; set; }
|
|||
|
|
|||
|
[BsonIgnore]
|
|||
|
public TimeOnly Date
|
|||
|
{
|
|||
|
get
|
|||
|
{
|
|||
|
return TimeOnly.Parse(DateMongo);
|
|||
|
}
|
|||
|
set
|
|||
|
{
|
|||
|
DateMongo = value.ToShortTimeString();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|