﻿using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace ForDinner.Entities
{
    //对于文档型文件,可以考虑在上传时加载关键词?No,但是可以考虑预览文件
    public class Asset:IMongoEntity
    {

        [BsonId]
        public ObjectId Id { get; set; }

        [Required, Display(Name = "资源名称")]//可以重名,支持各种字符
        public string Name { get; set; }
        [Display(Name = "描述")]//对于文档型文件 
        public string Description { get; set; }
        //GridFs的主键
        public string GridFileId { get; set; }
        [Display(Name = "文件大小")]
        public int  SizeOfBytes { get; set; }
        public string FileType { get; set; }//文件扩展名
        public List<string> KeyWords { get; set; }//关键字
        public string Uploader { get; set; }//上传人
        public DateTime UploadTime { get; set; }//上传时间



    }
}