Skip to content

Commit

Permalink
models.file:BaseFile,OriginalFile,MasterFile,ConvertedFile - split Fi…
Browse files Browse the repository at this point in the history
…le into separate classes
  • Loading branch information
MatteoCampinoti94 committed Oct 22, 2024
1 parent 59c5823 commit ea42242
Show file tree
Hide file tree
Showing 2 changed files with 198 additions and 188 deletions.
11 changes: 6 additions & 5 deletions acacore/database/files_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

from acacore.models.event import Event
from acacore.models.file import ConvertedFile
from acacore.models.file import MasterFile
from acacore.models.file import OriginalFile
from acacore.models.metadata import Metadata
from acacore.models.reference_files import TActionType
Expand Down Expand Up @@ -65,28 +66,28 @@ def __init__(
{"uuid": ["uuid"], "checksum": ["checksum"], "action": ["action"]},
["root"],
)
self.master_files: Table[ConvertedFile] = Table(
self.master_files: Table[MasterFile] = Table(
self.connection,
ConvertedFile,
MasterFile,
"files_master",
["relative_path"],
{"uuid": ["uuid"], "checksum": ["checksum"], "action": ["action"]},
{"uuid": ["uuid"], "checksum": ["checksum"]},
["root"],
)
self.access_files: Table[ConvertedFile] = Table(
self.connection,
ConvertedFile,
"files_master",
["relative_path"],
{"uuid": ["uuid"], "checksum": ["checksum"], "action": ["action"]},
{"uuid": ["uuid"], "checksum": ["checksum"]},
["root"],
)
self.statutory_files: Table[ConvertedFile] = Table(
self.connection,
ConvertedFile,
"files_statutory",
["relative_path"],
{"uuid": ["uuid"], "checksum": ["checksum"], "action": ["action"]},
{"uuid": ["uuid"], "checksum": ["checksum"]},
["root"],
)

Expand Down
Loading

0 comments on commit ea42242

Please sign in to comment.