using System;
using System.Collections.Generic;
using System.Text;
namespace Apewer.Source
{
/// 数据库记录通用字段模型,此模型中的 Key 属性带有主键特性。
/// 带有 Independent 特性的模型不包含此类型声明的属性。
[Serializable]
public abstract class KeyRecord : Record
{
/// 记录主键,一般使用 GUID 的字符串形式。
///
/// 注:
/// 1. 默认长度为 32,需要修改长度时应该重写此属性;
/// 2. 带有 Independent 特性的模型不包含此属性。
///
[PrimaryKey]
[Column("_key", ColumnType.NVarChar, 32)]
public override string Key { get => base.Key; set => base.Key = value; }
}
}