﻿using Newtonsoft.Json;
using OrientDb.Http.JsonConverters;

namespace OrientDb.Http
{
	public class BatchOperationRecord<T> where T : class
	{
		public T Value { get; set; }
	}

	public class BatchCreateRecord<T> : BatchOperationRecord<T>
		where T : class
	{
		[JsonProperty("@class")]
		public string Class { get; set; } = typeof(T).Name;
	}
	public class BatchUpdateRecord<T> : BatchOperationRecord<T>
		where T : class
	{
		[JsonProperty("@rid")]
		[JsonConverter(typeof(RidConverter))]
		public Rid Rid { get; set; }
	}
	public class BatchDeleteRecord
	{
		[JsonProperty("@rid")]
		[JsonConverter(typeof(RidConverter))]
		public Rid Rid { get; set; }
	}
}
