Path: redb/redb.Core/Models/Entities/RedbObjectRow.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Core/Models/Entities/RedbObjectRow.cs
----
using System;
using System.Text.Json.Serialization;
namespace redb.Core.Models.Entities
{
///
/// POCO for _objects table.
/// Used for direct SQL queries to objects table.
/// Not to be confused with RedbObject<TProps> which is a domain wrapper.
///
public class RedbObjectRow
{
///
/// Object ID.
///
[JsonPropertyName("id")]
public long Id { get; set; }
///
/// Parent object ID.
///
[JsonPropertyName("id_parent")]
public long? IdParent { get; set; }
///
/// Scheme ID.
///
[JsonPropertyName("id_scheme")]
public long IdScheme { get; set; }
///
/// Owner user ID.
///
[JsonPropertyName("id_owner")]
public long IdOwner { get; set; }
///
/// Last modifier user ID.
///
[JsonPropertyName("id_who_change")]
public long IdWhoChange { get; set; }
///
/// Creation date.
///
[JsonPropertyName("date_create")]
public DateTimeOffset DateCreate { get; set; }
///
/// Last modification date.
///
[JsonPropertyName("date_modify")]
public DateTimeOffset DateModify { get; set; }
///
/// Begin date (for temporal objects).
///
[JsonPropertyName("date_begin")]
public DateTimeOffset? DateBegin { get; set; }
///
/// Complete date (for temporal objects).
///
[JsonPropertyName("date_complete")]
public DateTimeOffset? DateComplete { get; set; }
///
/// External key for integration.
///
[JsonPropertyName("key")]
public long? Key { get; set; }
///
/// Object name.
///
[JsonPropertyName("name")]
public string? Name { get; set; }
///
/// Object note.
///
[JsonPropertyName("note")]
public string? Note { get; set; }
///
/// Hash for change tracking.
///
[JsonPropertyName("hash")]
public Guid? Hash { get; set; }
// Value columns for primitive storage in object itself
///
/// Long value stored directly in object row.
///
[JsonPropertyName("_value_long")]
public long? ValueLong { get; set; }
///
/// String value stored directly in object row.
///
[JsonPropertyName("_value_string")]
public string? ValueString { get; set; }
///
/// Guid value stored directly in object row.
///
[JsonPropertyName("_value_guid")]
public Guid? ValueGuid { get; set; }
///
/// Boolean value stored directly in object row.
///
[JsonPropertyName("_value_bool")]
public bool? ValueBool { get; set; }
///
/// Double value stored directly in object row.
///
[JsonPropertyName("_value_double")]
public double? ValueDouble { get; set; }
///
/// Numeric/decimal value stored directly in object row.
///
[JsonPropertyName("_value_numeric")]
public decimal? ValueNumeric { get; set; }
///
/// DateTime value stored directly in object row.
///
[JsonPropertyName("_value_datetime")]
public DateTimeOffset? ValueDatetime { get; set; }
///
/// Binary data stored directly in object row.
///
[JsonPropertyName("_value_bytes")]
public byte[]? ValueBytes { get; set; }
/// Unique key within the scheme (V4, UNIQUE stage 1).
[JsonPropertyName("_value_unique")]
public string? ValueUnique { get; set; }
public override string ToString()
{
return $"ObjectRow {Id} (Scheme:{IdScheme}, Name:{Name ?? "null"})";
}
}
}