示例#1
0
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
示例#2
0
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))  #假条状态
示例#3
0
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))  # 假条状态
示例#4
0
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))
示例#5
0
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)) #佳田状态 批准或者不批准
示例#6
0
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)
示例#7
0
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()
示例#8
0
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)
示例#9
0
文件: models.py 项目: Hqj130359/Flask
class Picture(BaseModel):
    picture = models.Column(models.String(64))
示例#10
0
文件: models.py 项目: Hqj130359/Flask
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)
示例#11
0
class Picture(BaseModel):
    __tablename__ = 'picture'
    label = models.Column(models.String(64))
    picture = models.Column(models.String(64))
示例#12
0
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))
示例#13
0
class ArticleType(BaseModel):
    __tablename__ = "articletype"
    id = models.Column(models.Integer, primary_key=True)
    type = models.Column(models.String(32))
示例#14
0
class Types(BaseModel):
    __bind_key__ = "dangdangdata"
    __tablename__ = "types"
    id = models.Column(models.Integer, primary_key=True)
    type = models.Column(models.String(255))
示例#15
0
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))
示例#16
0
class Picture(BaseModel):
    photo = models.Column(models.String(32))  # 联系方式
示例#17
0
class User(BaseModel):
    __tablename__ = "user"
    user_name = models.Column(models.String(32))
    password = models.Column(models.String(32))
    email = models.Column(models.String(32))
示例#18
0
class Picture(BaseModel):
    __tablename__ = "picture"
    picture = models.Column(models.String(64))
示例#19
0
class Picture(BaseModel):
    picture = models.Column(models.String(64))
    label = models.Column(models.String(64))

# models.create_all()
示例#20
0
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)