-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodels.py
21 lines (17 loc) · 935 Bytes
/
models.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from sqlalchemy import Column, Integer, String, Boolean, Text
from database import Base
from pydantic import BaseModel
class AppDBModel(Base):
__tablename__ = "apps"
id = Column(Integer, primary_key=True, index=True)
package_name = Column(String(length=255), nullable=True) # Specify the length for VARCHAR
app_name = Column(String(length=255), nullable=True) # Specify the length for VARCHAR
version_code = Column(Integer, nullable=True)
version_name = Column(String(length=255),nullable=True) # Specify the length for VARCHAR
file_size = Column(Integer,nullable=True)
permissions = Column(Text,nullable=True)
is_system_app = Column(Boolean)
is_malicious = Column(Boolean)
threat_category = Column(String(length=255), nullable=True) # Specify the length for VARCHAR
static_analysis_results = Column(Text, nullable=True)
dynamic_analysis_results = Column(Text, nullable=True)