﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Nest;
using Ojibwe.Public.Sdk.Models.Interfaces;

namespace Ojibwe.DataAccess.ElasticSearch.Models
{
    public class Blob : ModelBase, IBlob
    {
        [ElasticProperty(Analyzer = "keyword", Type = FieldType.String)]
        public Guid KeyId { get; set; }
        [ElasticProperty(Analyzer = "keyword", Type = FieldType.String)]
        public Guid OwnerUserId { get; set; }
        public long Length { get; set; }

        public Blob() { }

        internal Blob(IBlob blob)
        {
            Id = blob.Id;
            KeyId = blob.KeyId;
            OwnerUserId = blob.OwnerUserId;
        }
    }
}
