Work on event files and related
This commit is contained in:
@@ -4,7 +4,8 @@ from typing import Dict, List, Optional, Set, Union
|
||||
from pydantic import BaseModel, EmailStr, Field, Json, PrivateAttr, ValidationError, validator
|
||||
|
||||
from app.db_sql import get_id_random, redis_lookup_id_random
|
||||
from app.lib_general import log, logging
|
||||
# from app.lib_general import log, logging
|
||||
from app.log import log, logging, logger_reset
|
||||
|
||||
from app.models.common_field_schema import base_fields, default_num_bytes
|
||||
from app.models.hosted_file_models import Hosted_File_Base
|
||||
@@ -16,7 +17,7 @@ class Event_File_Base(BaseModel):
|
||||
log.debug(locals())
|
||||
|
||||
id_random: Optional[str] = Field(
|
||||
**base_fields['event_file_id_random'],
|
||||
# **base_fields['event_file_id_random'],
|
||||
alias = 'event_file_id_random',
|
||||
)
|
||||
id: Optional[int] = Field(
|
||||
@@ -26,7 +27,7 @@ class Event_File_Base(BaseModel):
|
||||
hosted_file_id_random: Optional[str]
|
||||
hosted_file_id: Optional[int]
|
||||
|
||||
# NOTE: Handeling this outside of the Pydantic model and model validation. See below as well. -STI 2021-09-10
|
||||
# NOTE: Handling this outside of the Pydantic model and model validation. See below as well. -STI 2021-09-10
|
||||
for_type: Optional[str]
|
||||
for_id: Optional[int] # NOTE: This is reversed with for_id_random
|
||||
for_id_random: Optional[str] # NOTE: This is reversed with for_id
|
||||
@@ -49,6 +50,8 @@ class Event_File_Base(BaseModel):
|
||||
event_track_id: Optional[int]
|
||||
|
||||
filename: Optional[str]
|
||||
filename_no_ext: Optional[str] # Currently created with a view
|
||||
filename_w_ext: Optional[str] # Currently created with a view
|
||||
extension: Optional[str]
|
||||
title: Optional[str]
|
||||
description: Optional[str]
|
||||
|
||||
Reference in New Issue
Block a user