SUBD_LAB/SUBD_LABA/Database/Models.cs

61 lines
1.5 KiB
C#
Raw Normal View History

2024-05-21 22:20:17 +04:00
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
using System;
2024-05-14 17:48:22 +04:00
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Database
{
public class Album
{
2024-05-21 22:20:17 +04:00
[BsonRepresentation(BsonType.Int32)]
2024-05-14 17:48:22 +04:00
public int Id { get; set; }
public string Title { get; set; }
public string Description { get; set; }
}
public class Location
{
2024-05-21 22:20:17 +04:00
[BsonRepresentation(BsonType.Int32)]
2024-05-14 17:48:22 +04:00
public int Id { get; set; }
public string Name { get; set; }
public string ShortName { get; set; }
}
public class Author
{
2024-05-21 22:20:17 +04:00
[BsonRepresentation(BsonType.Int32)]
2024-05-14 17:48:22 +04:00
public int Id { get; set; }
public string Name { get; set; }
public string PhoneNum { get; set; }
public string Email { get; set; }
}
public class Photo
{
2024-05-21 22:20:17 +04:00
[BsonRepresentation(BsonType.Int32)]
2024-05-14 17:48:22 +04:00
public int Id { get; set; }
public string Title { get; set; }
public string Description { get; set; }
public string Privacy { get; set; }
public DateTime UploadDate { get; set; }
public string ImagePath { get; set; }
public int AlbumId { get; set; }
public int LocationId { get; set; }
public int AuthorId { get; set; }
}
public class Comment
{
2024-05-21 22:20:17 +04:00
[BsonRepresentation(BsonType.Int32)]
2024-05-14 17:48:22 +04:00
public int Id { get; set; }
public DateTime PostDate { get; set; }
public string Content { get; set; }
public int PhotoId { get; set; }
}
2024-05-21 22:20:17 +04:00
public class Sequence
{
[BsonRepresentation(BsonType.String)]
public string Id { get; set; }
public int Count { get; set; }
}
2024-05-14 17:48:22 +04:00
}