buechermarkt/BuechermarktClient/Models/Book.cs

36 lines
693 B
C#
Raw Normal View History

using MongoDB.Bson.Serialization.Attributes;
using MongoDB.Bson;
using System;
namespace BuechermarktClient.Models
{
public class Book
{
[BsonId]
public ObjectId ID { get; set; }
[BsonElement("student")]
public ObjectId Student { get; set; }
[BsonElement("book_type")]
public ObjectId BookType { get; set; }
[BsonElement("price")]
public double Price { get; set; }
[BsonElement("state")]
public BookState State { get; set; }
[BsonElement("label_id")]
public string LabelId { get; set; }
}
public enum BookState
{
InStock,
Selled,
BackToStudent,
Missing
}
}