1
0
Fork 0
mirror of https://github.com/anyproto/anytype-heart.git synced 2025-06-07 21:37:04 +09:00

GO-3938 Rename relation

This commit is contained in:
kirillston 2025-06-05 12:55:06 +02:00
parent 96a4d2d5af
commit 3be9a8963c
No known key found for this signature in database
GPG key ID: BE4BF014F0ECDFE8
3 changed files with 20 additions and 20 deletions

View file

@ -25,7 +25,7 @@ func RelationFromDetails(det *domain.Details) *Relation {
Description: det.GetString(bundle.RelationKeyDescription),
Creator: det.GetString(bundle.RelationKeyCreator),
Revision: det.GetInt64(bundle.RelationKeyRevision),
IncludeTime: det.GetBool(bundle.RelationKeyIncludeTime),
IncludeTime: det.GetBool(bundle.RelationKeyRelationFormatIncludeTime),
},
}
@ -60,9 +60,9 @@ func (r *Relation) ToDetails() *domain.Details {
bundle.RelationKeyRelationReadonlyValue: domain.Bool(r.GetReadOnly()),
bundle.RelationKeyType: domain.String(bundle.TypeKeyRelation.BundledURL()),
// TODO Is it ok?
bundle.RelationKeyUniqueKey: domain.String(domain.RelationKey(r.GetKey()).URL()),
bundle.RelationKeyRevision: domain.Int64(r.GetRevision()),
bundle.RelationKeyIncludeTime: domain.Bool(r.GetIncludeTime()),
bundle.RelationKeyUniqueKey: domain.String(domain.RelationKey(r.GetKey()).URL()),
bundle.RelationKeyRevision: domain.Int64(r.GetRevision()),
bundle.RelationKeyRelationFormatIncludeTime: domain.Bool(r.GetIncludeTime()),
})
}

View file

@ -9,7 +9,7 @@ import (
"github.com/anyproto/anytype-heart/pkg/lib/pb/model"
)
const RelationChecksum = "bc68fd4137f2a048395db63eb5039fc4a5d8599ebe10669812809fa1793fa864"
const RelationChecksum = "b196956336cb7348a79d913d5e8e0a3f542424d3b175070725b90444114eaf0f"
const (
RelationKeyTag domain.RelationKey = "tag"
RelationKeyCamera domain.RelationKey = "camera"
@ -164,7 +164,7 @@ const (
RelationKeyPluralName domain.RelationKey = "pluralName"
RelationKeyHeaderRelationsLayout domain.RelationKey = "headerRelationsLayout"
RelationKeyApiObjectKey domain.RelationKey = "apiObjectKey"
RelationKeyIncludeTime domain.RelationKey = "includeTime"
RelationKeyRelationFormatIncludeTime domain.RelationKey = "relationFormatIncludeTime"
)
var (
@ -935,19 +935,6 @@ var (
ReadOnlyRelation: true,
Scope: model.Relation_type,
},
RelationKeyIncludeTime: {
DataSource: model.Relation_details,
Description: "Should time be shown for relation values with date format",
Format: model.RelationFormat_checkbox,
Hidden: true,
Id: "_brincludeTime",
Key: "includeTime",
Name: "IncludeTime",
ReadOnly: true,
ReadOnlyRelation: true,
Scope: model.Relation_type,
},
RelationKeyIngredients: {
DataSource: model.Relation_details,
@ -1575,6 +1562,19 @@ var (
ReadOnlyRelation: true,
Scope: model.Relation_type,
},
RelationKeyRelationFormatIncludeTime: {
DataSource: model.Relation_details,
Description: "Should time be shown for relation values with date format",
Format: model.RelationFormat_checkbox,
Hidden: true,
Id: "_brrelationFormatIncludeTime",
Key: "relationFormatIncludeTime",
Name: "IncludeTime",
ReadOnly: true,
ReadOnlyRelation: true,
Scope: model.Relation_type,
},
RelationKeyRelationFormatObjectTypes: {
DataSource: model.Relation_details,

View file

@ -1591,7 +1591,7 @@
"description": "Should time be shown for relation values with date format",
"format": "checkbox",
"hidden": true,
"key": "includeTime",
"key": "relationFormatIncludeTime",
"maxCount": 0,
"name": "IncludeTime",
"readonly": true,