Skip to content

Commit

Permalink
feat(tag): support self link
Browse files Browse the repository at this point in the history
  • Loading branch information
renjie-run committed Dec 20, 2024
1 parent a23df81 commit cdb38d7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions repo_metadata/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,9 @@ def __init__(self):

# tags table
class TagsTable(object):
def __init__(self, name, link_id):
self.link_id = link_id
def __init__(self, name, file_link_id, self_link_id):
self.file_link_id = file_link_id
self.self_link_id = self_link_id
self.name = name

@property
Expand All @@ -236,6 +237,8 @@ def __init__(self):
self.name = MetadataColumn('_tag_name', '_tag_name', PropertyTypes.TEXT)
self.color = MetadataColumn('_tag_color', '_tag_color', PropertyTypes.TEXT)
self.file_links = MetadataColumn('_tag_file_links', '_tag_file_links', PropertyTypes.LINK)
self.parent_links = MetadataColumn('_tag_parent_links', '_tag_parent_links', PropertyTypes.LINK)
self.sub_links = MetadataColumn('_tag_sub_links', '_tag_sub_links', PropertyTypes.LINK)


METADATA_TABLE = MetadataTable('0001', 'Table1')
Expand All @@ -259,4 +262,4 @@ def __init__(self):

FACES_TABLE = FacesTable('faces', '0001')

TAGS_TABLE = TagsTable('tags', '0002')
TAGS_TABLE = TagsTable('tags', '0002', '0003')

0 comments on commit cdb38d7

Please sign in to comment.