style: 💄 code format (#159)

Co-authored-by: tk <fiyne1a@dingtalk.com>
This commit is contained in:
2024-07-23 09:34:57 +08:00
committed by GitHub
parent 1a28e8d5a6
commit 33e60a5bd7
46 changed files with 381 additions and 369 deletions

View File

@@ -5,6 +5,7 @@ public abstract record ImmutableEntity : ImmutableEntity<long>
{
/// <inheritdoc cref="EntityBase{T}.Id" />
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
[CsvIgnore]
[Snowflake]
public override long Id { get; init; }
}
@@ -18,17 +19,18 @@ public abstract record ImmutableEntity<T> : LiteImmutableEntity<T>, IFieldCreate
{
/// <inheritdoc cref="IFieldCreatedUser.CreatedUserId" />
[Column(CanUpdate = false, Position = -1)]
[Ignore]
[CsvIgnore]
[JsonIgnore]
public long? CreatedUserId { get; init; }
/// <inheritdoc cref="IFieldCreatedUser.CreatedUserName" />
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31, CanUpdate = false, Position = -1)]
[Ignore]
[CsvIgnore]
[JsonIgnore]
public virtual string CreatedUserName { get; init; }
/// <inheritdoc cref="EntityBase{T}.Id" />
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
[CsvIgnore]
public override T Id { get; init; }
}

View File

@@ -5,6 +5,7 @@ public abstract record LiteImmutableEntity : LiteImmutableEntity<long>
{
/// <inheritdoc cref="EntityBase{T}.Id" />
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
[CsvIgnore]
[Snowflake]
public override long Id { get; init; }
}
@@ -18,13 +19,13 @@ public abstract record LiteImmutableEntity<T> : EntityBase<T>, IFieldCreatedTime
{
/// <inheritdoc cref="IFieldCreatedTime.CreatedTime" />
[Column(ServerTime = DateTimeKind.Local, CanUpdate = false, Position = -1)]
[Ignore]
[CsvIgnore]
[JsonIgnore]
public virtual DateTime CreatedTime { get; init; }
/// <inheritdoc cref="EntityBase{T}.Id" />
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
[Ignore]
[CsvIgnore]
[JsonIgnore]
public override T Id { get; init; }
}

View File

@@ -5,6 +5,7 @@ public abstract record LiteMutableEntity : LiteMutableEntity<long>
{
/// <inheritdoc cref="EntityBase{T}.Id" />
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
[CsvIgnore]
[Snowflake]
public override long Id { get; init; }
}
@@ -17,11 +18,12 @@ public abstract record LiteMutableEntity<T> : LiteImmutableEntity<T>, IFieldModi
{
/// <inheritdoc cref="EntityBase{T}.Id" />
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
[CsvIgnore]
public override T Id { get; init; }
/// <inheritdoc cref="IFieldModifiedTime.ModifiedTime" />
[Column(ServerTime = DateTimeKind.Local, CanInsert = false, Position = -1)]
[Ignore]
[CsvIgnore]
[JsonIgnore]
public virtual DateTime? ModifiedTime { get; init; }
}

View File

@@ -5,6 +5,7 @@ public abstract record LiteVersionEntity : LiteVersionEntity<long>
{
/// <inheritdoc cref="EntityBase{T}.Id" />
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
[CsvIgnore]
[Snowflake]
public override long Id { get; init; }
}
@@ -17,12 +18,13 @@ public abstract record LiteVersionEntity<T> : LiteMutableEntity<T>, IFieldVersio
{
/// <inheritdoc cref="EntityBase{T}.Id" />
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
[CsvIgnore]
[Snowflake]
public override T Id { get; init; }
/// <inheritdoc cref="IFieldVersion.Version" />
[Column(IsVersion = true, Position = -1)]
[Ignore]
[CsvIgnore]
[JsonIgnore]
public virtual long Version { get; init; }
}

View File

@@ -5,6 +5,7 @@ public abstract record MutableEntity : MutableEntity<long>
{
/// <inheritdoc cref="EntityBase{T}.Id" />
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
[CsvIgnore]
[Snowflake]
public override long Id { get; init; }
}
@@ -17,17 +18,18 @@ public abstract record MutableEntity<T> : LiteMutableEntity<T>, IFieldModifiedUs
{
/// <inheritdoc cref="EntityBase{T}.Id" />
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
[CsvIgnore]
public override T Id { get; init; }
/// <inheritdoc cref="IFieldModifiedUser.ModifiedUserId" />
[Column(CanInsert = false, Position = -1)]
[Ignore]
[CsvIgnore]
[JsonIgnore]
public long? ModifiedUserId { get; init; }
/// <inheritdoc cref="IFieldModifiedUser.ModifiedUserName" />
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31, CanInsert = false, Position = -1)]
[Ignore]
[CsvIgnore]
[JsonIgnore]
public string ModifiedUserName { get; init; }
}

View File

@@ -5,6 +5,7 @@ public abstract record SimpleEntity : SimpleEntity<long>
{
/// <inheritdoc cref="EntityBase{T}.Id" />
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
[CsvIgnore]
[Snowflake]
public override long Id { get; init; }
}

View File

@@ -5,6 +5,7 @@ public abstract record VersionEntity : VersionEntity<long>
{
/// <inheritdoc cref="EntityBase{T}.Id" />
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
[CsvIgnore]
[Snowflake]
public override long Id { get; init; }
}
@@ -17,29 +18,30 @@ public abstract record VersionEntity<T> : LiteVersionEntity<T>, IFieldModifiedUs
{
/// <inheritdoc />
[Column(CanUpdate = false, Position = -1)]
[Ignore]
[CsvIgnore]
[JsonIgnore]
public virtual long? CreatedUserId { get; init; }
/// <inheritdoc />
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31, CanUpdate = false, Position = -1)]
[Ignore]
[CsvIgnore]
[JsonIgnore]
public virtual string CreatedUserName { get; init; }
/// <inheritdoc cref="EntityBase{T}.Id" />
[Column(IsIdentity = false, IsPrimary = true, Position = 1)]
[CsvIgnore]
public override T Id { get; init; }
/// <inheritdoc cref="IFieldModifiedUser.ModifiedUserId" />
[Column(CanInsert = false, Position = -1)]
[Ignore]
[CsvIgnore]
[JsonIgnore]
public virtual long? ModifiedUserId { get; init; }
/// <inheritdoc cref="IFieldModifiedUser.ModifiedUserName" />
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31, CanInsert = false, Position = -1)]
[Ignore]
[CsvIgnore]
[JsonIgnore]
public virtual string ModifiedUserName { get; init; }
}