chore: baseline before agreements
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
from sqlalchemy import Column, Integer, String, Date, DateTime, Text, Enum
|
||||
from sqlalchemy.sql import func
|
||||
from app.database.database import Base
|
||||
from datetime import datetime
|
||||
from typing import Optional
|
||||
from sqlalchemy.orm import relationship
|
||||
|
||||
class Project(Base):
|
||||
__tablename__ = "projects"
|
||||
|
||||
id = Column(Integer, primary_key=True, index=True)
|
||||
name = Column(String, index=True, nullable=False)
|
||||
contract_number = Column(String)
|
||||
contract_date = Column(Date)
|
||||
customer = Column(String)
|
||||
currency = Column(String, default="RUB")
|
||||
start_date = Column(Date)
|
||||
end_date = Column(Date)
|
||||
status = Column(String, default="active")
|
||||
created_at = Column(DateTime, default=func.now())
|
||||
updated_at = Column(DateTime, default=func.now(), onupdate=func.now())
|
||||
|
||||
# Relationships
|
||||
boq_documents = relationship("BoqDocument", back_populates="project")
|
||||
systems = relationship("System", back_populates="project")
|
||||
|
||||
def __repr__(self):
|
||||
return f"<Project(id={self.id}, name='{self.name}')>"
|
||||
Reference in New Issue
Block a user