using System;

namespace LinqToDB.Concurrency
{
	/// <summary>
	/// Defines optimistic lock column value generation strategy on record update.
	/// Used with <see cref="OptimisticLockPropertyAttribute" /> and <see cref="ConcurrencyExtensions" /> extensions.
	/// </summary>
	public enum VersionBehavior
	{
		/// <summary>
		/// Column value generated by database automatically on update. E.g. using SQL Server rowversion/timestamp column or database trigger.
		/// </summary>
		Auto,
		/// <summary>
		/// Column value should be incremented by 1.
		/// </summary>
		AutoIncrement,

#pragma warning disable CA1200 // Avoid using cref tags with a prefix: https://github.com/dotnet/roslyn-analyzers/issues/2004
		/// <summary>
		/// Uses <see cref="Guid.NewGuid()"/> value.
		/// Supported column types:
		/// <list type="bullet">
		/// <item><see cref="System.Guid"/></item>
		/// <item><see cref="string"/> using <see cref="Guid.ToString()"/></item>
		/// <item><see cref="T:byte[]"/> using <see cref="Guid.ToByteArray()"/></item>
		/// </list>
		/// </summary>
		Guid,
#pragma warning restore CA1200 // Avoid using cref tags with a prefix
	}
}
