buechermarkt/BuechermarktClient/Models/Book.cs

36 lines
728 B
C#
Raw Permalink Normal View History

2017-09-27 13:57:10 +00:00
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
}
}