flower-story/Server/Data/FlowerDatabase.cs
2024-10-12 14:34:11 +08:00

43 lines
968 B
C#

using Blahblah.FlowerStory.Server.Data.Model;
using Microsoft.EntityFrameworkCore;
namespace Blahblah.FlowerStory.Server.Data;
/// <summary>
/// 数据库管理类
/// </summary>
/// <param name="options">选项参数</param>
public class FlowerDatabase(DbContextOptions<FlowerDatabase> options) : DbContext(options)
{
/// <summary>
/// 用户集
/// </summary>
public DbSet<UserItem> Users { get; set; }
/// <summary>
/// 花草集
/// </summary>
public DbSet<FlowerItem> Flowers { get; set; }
/// <summary>
/// 记录集
/// </summary>
public DbSet<RecordItem> Records { get; set; }
/// <summary>
/// 会话令牌集
/// </summary>
public DbSet<TokenItem> Tokens { get; set; }
/// <summary>
/// 照片集
/// </summary>
public DbSet<PhotoItem> Photos { get; set; }
/// <summary>
/// 评论集
/// </summary>
public DbSet<CommentItem> Comments { get; set; }
}