class Curriculum(BaseModel): __tablename__ = "curriculum" c_id = models.Column(models.String(32)) c_name = models.Column(models.String(32)) c_time = models.Column(models.Date) def __repr__(self): return self.c_name
class Leave(BaseModel): __tablename__ = 'leave' request_id = models.Column(models.Integer) #请假人id request_name = models.Column(models.String(32)) #请假人姓名 request_type = models.Column(models.String(32)) #请假类型 request_start_time = models.Column(models.String(32)) #开始时间 request_end_time = models.Column(models.String(32)) #结束时间 request_reason = models.Column(models.Text) #事由 request_phone = models.Column(models.String(32)) #联系方式 request_status = models.Column(models.String(32)) #假条状态
class Leave(BaseModel): __tablename__ = "leave" request_id = models.Column(models.Integer) #请假人id request_name = models.Column(models.String(32)) #请假人姓名 request_type = models.Column(models.String(32)) #假期类型 request_start_time = models.Column(models.String(32)) #起始时间 request_end_time = models.Column(models.String(32)) #结束时间 request_description = models.Column(models.Text) #请假事由 request_phone = models.Column(models.String(32)) #联系方式 request_status = models.Column(models.String(32)) # 假条状态
class Leave(BaseModel): __tablename__ = "leave" request_id = models.Column(models.Integer) request_name = models.Column(models.String(32)) request_type = models.Column(models.String(32)) request_startdate = models.Column(models.String(32)) request_enddate = models.Column(models.String(32)) request_description = models.Column(models.Text) request_phone = models.Column(models.String(32)) request_status = models.Column(models.String(32))
class Leave(BaseModel): __tablename__="leave" request_id=models.Column(models.Integer)#请假人id request_name=models.Column(models.String(32))#请假人姓名 request_type=models.Column(models.String(32))#请假类型 request_start_time=models.Column(models.String(32))#请假开始时间 request_end_time=models.Column(models.String(32))#请假结束时间 request_description=models.Column(models.Text)#请假原因 request__phone=models.Column(models.String(32)) #联系方式 request_static=models.Column(models.String(32)) #佳田状态 批准或者不批准
class Books(BaseModel): __bind_key__ = "dangdangdata" __tablename__ = "books" id = models.Column(models.Integer, primary_key=True) title = models.Column(models.String(255)) detail_description = models.Column(models.String(1024)) picture = models.Column(models.String(255)) author = models.Column(models.String(255)) publish_time = models.Column(models.String(255)) price = models.Column(models.String(10)) type_id = models.Column(models.Integer)
class BaseModel(models.Model): __abstract__ = True #声明当前类是抽象类,被继承调用不被创建 id = models.Column(models.Integer,primary_key = True,autoincrement=True) def save(self): db = models.session() db.add(self) db.commit() def delete(self): db = models.session() db.delete(self) db.commit()
class ApplicationForLeave(BaseModel): """ 申请 0 批准 1 驳回 2 销假 3 """ __tablename = "application_for_leave" person_id = models.Column(models.String(32)) person_name = models.Column(models.String(32)) person_phone = models.Column(models.String(32)) leave_type = models.Column(models.String(32)) leave_description = models.Column(models.Text) leave_start_time = models.Column(models.String(32)) leave_end_time = models.Column(models.String(32)) leave_status = models.Column(models.Integer)
class Picture(BaseModel): picture = models.Column(models.String(64))
class Curriculum(BaseModel): __tablename__ = "curriculum" c_id = models.Column(models.String(32)) c_name = models.Column(models.String(32)) c_time = models.Column(models.Date)
class Picture(BaseModel): __tablename__ = 'picture' label = models.Column(models.String(64)) picture = models.Column(models.String(64))
class Course(BaseModel): __tablename__ = "course" course_number = models.Column(models.String(32)) course_name = models.Column(models.String(32)) course_time = models.Column(models.Date) course_teacher = models.Column(models.String(32))
class ArticleType(BaseModel): __tablename__ = "articletype" id = models.Column(models.Integer, primary_key=True) type = models.Column(models.String(32))
class Types(BaseModel): __bind_key__ = "dangdangdata" __tablename__ = "types" id = models.Column(models.Integer, primary_key=True) type = models.Column(models.String(255))
class Userinfo(BaseModel): __bind_key__ = "bigproject" __tablename__ = "userinfo" id = models.Column(models.Integer, primary_key=True) user_name = models.Column(models.String(32)) user_passwd = models.Column(models.String(32))
class Picture(BaseModel): photo = models.Column(models.String(32)) # 联系方式
class User(BaseModel): __tablename__ = "user" user_name = models.Column(models.String(32)) password = models.Column(models.String(32)) email = models.Column(models.String(32))
class Picture(BaseModel): __tablename__ = "picture" picture = models.Column(models.String(64))
class Picture(BaseModel): picture = models.Column(models.String(64)) label = models.Column(models.String(64)) # models.create_all()
class Course(BaseModel): __tablename__ = 'course' c_id = models.Column(models.String(32)) c_name = models.Column(models.String(32)) c_time = models.Column(models.Date)