Improvements upon front lead to improvements here
This commit is contained in:
parent
3414b5c334
commit
34ae028698
6 changed files with 395 additions and 169 deletions
24
db_models.py
24
db_models.py
|
|
@ -6,6 +6,8 @@ from based.columns import (
|
|||
)
|
||||
from pydantic import BaseModel
|
||||
|
||||
from db_addendum import UserRefColumnDefinition
|
||||
|
||||
|
||||
class AccessType(enum.Enum):
|
||||
READ = "read"
|
||||
|
|
@ -19,7 +21,6 @@ META_INFO_TABLE_SCHEMA = [
|
|||
PrimarySerialColumnDefinition("id"),
|
||||
TextColumnDefinition("name", unique=True),
|
||||
TextColumnDefinition("value"),
|
||||
TextColumnDefinition("allowed_columns", default="*"),
|
||||
]
|
||||
|
||||
|
||||
|
|
@ -27,7 +28,6 @@ class MetaInfo(BaseModel):
|
|||
id: int
|
||||
name: str
|
||||
value: str
|
||||
allowed_columns: str
|
||||
|
||||
|
||||
USER_GROUP_TABLE_NAME = "user_group"
|
||||
|
|
@ -73,7 +73,7 @@ class User(BaseModel):
|
|||
USER_IN_USER_GROUP_JOIN_TABLE_NAME = "user_in_user_group"
|
||||
USER_IN_USER_GROUP_JOIN_TABLE_SCHEMA = [
|
||||
PrimarySerialColumnDefinition("id"),
|
||||
IntegerColumnDefinition("user_id"),
|
||||
UserRefColumnDefinition("user_id"),
|
||||
IntegerColumnDefinition("user_group_id"),
|
||||
]
|
||||
|
||||
|
|
@ -108,7 +108,7 @@ ASSETS_TABLE_SCHEMA = [
|
|||
TextColumnDefinition("name"),
|
||||
TextColumnDefinition("description", default=""),
|
||||
TextColumnDefinition("fid"),
|
||||
TextColumnDefinition("catalog", default="/root"),
|
||||
TextColumnDefinition("tags", default=""),
|
||||
]
|
||||
|
||||
|
||||
|
|
@ -118,19 +118,3 @@ class Asset(BaseModel):
|
|||
description: str
|
||||
fid: str
|
||||
catalog: str
|
||||
|
||||
|
||||
ASSET_ACCESS_TABLE_NAME = "asset_access"
|
||||
ASSET_ACCESS_TABLE_SCHEMA = [
|
||||
PrimarySerialColumnDefinition("id"),
|
||||
IntegerColumnDefinition("user_group_id"),
|
||||
IntegerColumnDefinition("asset_id"),
|
||||
TextColumnDefinition("access_type"),
|
||||
]
|
||||
|
||||
|
||||
class AssetAccess(BaseModel):
|
||||
id: int
|
||||
user_group_id: int
|
||||
asset_id: int
|
||||
access_type: str
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue