Add Project model
This commit is contained in:
parent
7c1efe1f6d
commit
be8f326e61
25
models/project.py
Normal file
25
models/project.py
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
from sqlalchemy import Column, String, Integer, Boolean, DateTime, ForeignKey, Text
|
||||||
|
from sqlalchemy.orm import relationship
|
||||||
|
from sqlalchemy.sql import func
|
||||||
|
from core.database import Base
|
||||||
|
import uuid
|
||||||
|
|
||||||
|
class Project(Base):
|
||||||
|
__tablename__ = "projects"
|
||||||
|
|
||||||
|
id = Column(String, primary_key=True, default=lambda: str(uuid.uuid4()))
|
||||||
|
title = Column(String(255), nullable=False, index=True)
|
||||||
|
description = Column(Text, nullable=False)
|
||||||
|
student_name = Column(String(100), nullable=False)
|
||||||
|
supervisor_name = Column(String(100), nullable=False)
|
||||||
|
department = Column(String(100), nullable=False)
|
||||||
|
year = Column(Integer, nullable=False)
|
||||||
|
status = Column(String(50), default="In Progress")
|
||||||
|
technologies_used = Column(String(255))
|
||||||
|
github_link = Column(String(255))
|
||||||
|
documentation_link = Column(String(255))
|
||||||
|
grade = Column(String(10))
|
||||||
|
is_published = Column(Boolean, default=False)
|
||||||
|
|
||||||
|
created_at = Column(DateTime, default=func.now())
|
||||||
|
updated_at = Column(DateTime, default=func.now(), onupdate=func.now())
|
Loading…
x
Reference in New Issue
Block a user