24 lines
1004 B
C#
24 lines
1004 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using FluentNHibernate.Mapping;
|
|
using Taloyhtio.GeneralSSO.Server.CodeFiles.Common;
|
|
using Taloyhtio.GeneralSSO.Server.CodeFiles.Entities;
|
|
|
|
namespace Taloyhtio.GeneralSSO.Server.CodeFiles.Infrastructure.DataAccess.Mappings
|
|
{
|
|
public class SymmetricCryptoKeyMap : ClassMap<SymmetricCryptoKey>
|
|
{
|
|
public SymmetricCryptoKeyMap()
|
|
{
|
|
Table("[SymmetricCryptoKey]");
|
|
Id(x => x.Id);
|
|
Map(x => x.Bucket).Length(Constants.DataAccess.SymmetricCryptoKey.BUCKET_MAX_LEN).Not.Nullable().UniqueKey("UQ_SymmetricCryptoKey");
|
|
Map(x => x.Handle).Length(Constants.DataAccess.SymmetricCryptoKey.HANDLE_MAX_LEN).Not.Nullable().UniqueKey("UQ_SymmetricCryptoKey");
|
|
Map(x => x.ExpirationDate).Not.Nullable();
|
|
Map(x => x.Secret).CustomSqlType("image").Length(Constants.DataAccess.SymmetricCryptoKey.SECRET_MAX_LEN).Not.Nullable();
|
|
}
|
|
}
|
|
}
|