diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..4b5a294 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,4 @@ +{ + "python-envs.defaultEnvManager": "ms-python.python:conda", + "python-envs.defaultPackageManager": "ms-python.python:conda" +} \ No newline at end of file diff --git a/model/class_model.py b/model/class_model.py index 9b942b0..07039a6 100644 --- a/model/class_model.py +++ b/model/class_model.py @@ -8,12 +8,12 @@ class Class(Base): __tablename__ = "wl_class" - id = Column(Integer, primary_key=True, autoincrement=True) - class_number = Column(String(50)) - name = Column(String(100)) - start_date = Column(DateTime) - planned_end_date = Column(DateTime) - actual_end_date = Column(DateTime) - created_at = Column(DateTime) - updated_at = Column(DateTime) - is_deleted = Column(default=False, nullable=False) + id = Column(Integer, primary_key=True, autoincrement=True, comment="id") + class_number = Column(String(50), comment="班级编号") + name = Column(String(100), comment="班级名字") + start_date = Column(DateTime, comment="开班时间") + planned_end_date = Column(DateTime, comment="计划结课时间") + actual_end_date = Column(DateTime, comment="实际结课时间") + created_at = Column(DateTime, comment="数据创建时间") + updated_at = Column(DateTime, comment="数据更新时间") + is_deleted = Column(default=False, nullable=False, comment="逻辑删除字段") diff --git a/model/code_value_model.py b/model/code_value_model.py index ff79bb7..8e67aa5 100644 --- a/model/code_value_model.py +++ b/model/code_value_model.py @@ -8,11 +8,11 @@ class CodeValue(Base): __tablename__ = "wl_code_value" - id = Column(Integer, primary_key=True, autoincrement=True) - code = Column(String(50)) - meaning = Column(String(200)) - type = Column(String(100)) - is_enabled = Column(Boolean) - created_at = Column(DateTime) - updated_at = Column(DateTime) - is_deleted = Column(default=False, nullable=False) + id = Column(Integer, primary_key=True, autoincrement=True, comment="id") + code = Column(String(50), comment="编码") + meaning = Column(String(200), comment="意义") + type = Column(String(100), comment="类型") + is_enabled = Column(Boolean, comment="状态(是否可用)") + created_at = Column(DateTime, comment="数据创建时间") + updated_at = Column(DateTime, comment="数据更新时间") + is_deleted = Column(default=False, nullable=False, comment="逻辑删除字段") diff --git a/model/company_model.py b/model/company_model.py index 0fce4fc..35fb880 100644 --- a/model/company_model.py +++ b/model/company_model.py @@ -8,13 +8,13 @@ class Company(Base): __tablename__ = "wl_company" - id = Column(Integer, primary_key=True, autoincrement=True) - company_number = Column(String(50)) - name = Column(String(200)) - industry = Column(String(100)) - employee_scale = Column(String(50)) - main_business = Column(String(1000)) - registered_capital = Column(Numeric(16, 2)) - created_at = Column(DateTime) - updated_at = Column(DateTime) - is_deleted = Column(default=False, nullable=False) + id = Column(Integer, primary_key=True, autoincrement=True, comment="id") + company_number = Column(String(50), comment="企业编号") + name = Column(String(200), comment="企业名称") + industry = Column(String(100), comment="所属行业") + employee_scale = Column(String(50), comment="人员规模") + main_business = Column(String(1000), comment="主营业务") + registered_capital = Column(Numeric(16, 2), comment="注册资金") + created_at = Column(DateTime, comment="数据创建时间") + updated_at = Column(DateTime, comment="数据更新时间") + is_deleted = Column(default=False, nullable=False, comment="逻辑删除字段") diff --git a/model/course_model.py b/model/course_model.py index ae938c6..a1fc42a 100644 --- a/model/course_model.py +++ b/model/course_model.py @@ -8,10 +8,10 @@ class Course(Base): __tablename__ = "wl_course" - id = Column(Integer, primary_key=True, autoincrement=True) - course_number = Column(String(50)) - name = Column(String(100)) - planned_training_hours = Column(Numeric(8, 2)) - created_at = Column(DateTime) - updated_at = Column(DateTime) - is_deleted = Column(default=False, nullable=False) + id = Column(Integer, primary_key=True, autoincrement=True, comment="id") + course_number = Column(String(50), comment="课程编号") + name = Column(String(100), comment="课程名字") + planned_training_hours = Column(Numeric(8, 2), comment="计划培训课时") + created_at = Column(DateTime, comment="数据创建时间") + updated_at = Column(DateTime, comment="数据更新时间") + is_deleted = Column(default=False, nullable=False, comment="逻辑删除字段") diff --git a/model/employee_model.py b/model/employee_model.py index b8a14b7..327448b 100644 --- a/model/employee_model.py +++ b/model/employee_model.py @@ -8,16 +8,16 @@ class Employee(Base): __tablename__ = "wl_employee" - id = Column(Integer, primary_key=True, autoincrement=True) - employee_number = Column(String(50)) - name = Column(String(100)) - gender = Column(String(20)) - birth_date = Column(Date) - id_card_number = Column(String(18)) - hometown = Column(String(100)) - salary = Column(Numeric(12, 2)) - position_type = Column(String(50)) - position_level = Column(String(50)) - created_at = Column(DateTime) - updated_at = Column(DateTime) - is_deleted = Column(default=False, nullable=False) + id = Column(Integer, primary_key=True, autoincrement=True, comment="id") + employee_number = Column(String(50), comment="工号") + name = Column(String(100), comment="姓名") + gender = Column(String(20), comment="性别") + birth_date = Column(Date, comment="生日") + id_card_number = Column(String(18), comment="身份证号") + hometown = Column(String(100), comment="籍贯") + salary = Column(Numeric(12, 2), comment="薪资") + position_type = Column(String(50), comment="岗位类型") + position_level = Column(String(50), comment="岗位级别") + created_at = Column(DateTime, comment="数据创建时间") + updated_at = Column(DateTime, comment="数据更新时间") + is_deleted = Column(default=False, nullable=False, comment="逻辑删除字段") diff --git a/model/employment_info_model.py b/model/employment_info_model.py index 107a212..562d491 100644 --- a/model/employment_info_model.py +++ b/model/employment_info_model.py @@ -8,12 +8,12 @@ class EmploymentInfo(Base): __tablename__ = "wl_employment_info" - id = Column(Integer, primary_key=True, autoincrement=True) - student_id = Column(Integer) - employment_salary = Column(Numeric(12, 2)) - company_number = Column(String(50)) - resume_opened_at = Column(DateTime) - offer_received_at = Column(DateTime) - created_at = Column(DateTime) - updated_at = Column(DateTime) - is_deleted = Column(default=False, nullable=False) + id = Column(Integer, primary_key=True, autoincrement=True, comment="id") + student_id = Column(Integer, comment="学生id") + employment_salary = Column(Numeric(12, 2), comment="就业薪资") + company_number = Column(String(50), comment="就业的企业编号") + resume_opened_at = Column(DateTime, comment="简历开放时间") + offer_received_at = Column(DateTime, comment="拿到offer时间") + created_at = Column(DateTime, comment="数据创建时间") + updated_at = Column(DateTime, comment="数据更新时间") + is_deleted = Column(default=False, nullable=False, comment="逻辑删除字段") diff --git a/model/grade_model.py b/model/grade_model.py index 0b4599e..709b28d 100644 --- a/model/grade_model.py +++ b/model/grade_model.py @@ -8,11 +8,11 @@ class Grade(Base): __tablename__ = "wl_grade" - id = Column(Integer, primary_key=True, autoincrement=True) - student_number = Column(String(50)) - course_number = Column(String(50)) - exam_sequence = Column(Integer) - score = Column(Numeric(5, 2)) - created_at = Column(DateTime) - updated_at = Column(DateTime) - is_deleted = Column(default=False, nullable=False) + id = Column(Integer, primary_key=True, autoincrement=True, comment="id") + student_number = Column(String(50), comment="学生编号") + course_number = Column(String(50), comment="课程编号") + exam_sequence = Column(Integer, comment="考试序次") + score = Column(Numeric(5, 2), comment="分数") + created_at = Column(DateTime, comment="数据创建时间") + updated_at = Column(DateTime, comment="数据更新时间") + is_deleted = Column(default=False, nullable=False, comment="逻辑删除字段") diff --git a/model/interview_model.py b/model/interview_model.py index ef95f07..5a210d9 100644 --- a/model/interview_model.py +++ b/model/interview_model.py @@ -8,13 +8,13 @@ class Interview(Base): __tablename__ = "wl_interview" - id = Column(Integer, primary_key=True, autoincrement=True) - interview_at = Column(DateTime) - student_id = Column(Integer) - room = Column(String(100)) - sequence = Column(Integer) - company_id = Column(Integer) - result = Column(Boolean) - created_at = Column(DateTime) - updated_at = Column(DateTime) - is_deleted = Column(default=False, nullable=False) + id = Column(Integer, primary_key=True, autoincrement=True, comment="面试id") + interview_at = Column(DateTime, comment="面试时间") + student_id = Column(Integer, comment="学生id") + room = Column(String(100), comment="面试间") + sequence = Column(Integer, comment="面试序次") + company_id = Column(Integer, comment="面试的企业id") + result = Column(Boolean, comment="面试结果") + created_at = Column(DateTime, comment="数据创建时间") + updated_at = Column(DateTime, comment="数据更新时间") + is_deleted = Column(default=False, nullable=False, comment="逻辑删除字段") diff --git a/model/relation_model.py b/model/relation_model.py index 55d9844..51e214d 100644 --- a/model/relation_model.py +++ b/model/relation_model.py @@ -10,10 +10,10 @@ class Relation(Base): __tablename__ = "wl_relation" - id = Column(Integer, primary_key=True, autoincrement=True) - source_id = Column(String(50)) - destination_id = Column(Integer) - relation_type = Column(String(50)) - created_at = Column(DateTime) - updated_at = Column(DateTime) - is_deleted = Column(default=False, nullable=False) + id = Column(Integer, primary_key=True, autoincrement=True, comment="id") + source_id = Column(String(50), comment="关系来源标识") + destination_id = Column(Integer, comment="关系目标标识") + relation_type = Column(String(50), comment="关系类型") + created_at = Column(DateTime, comment="数据创建时间") + updated_at = Column(DateTime, comment="数据更新时间") + is_deleted = Column(default=False, nullable=False, comment="逻辑删除字段") diff --git a/model/student_model.py b/model/student_model.py index c33568c..afc2c82 100644 --- a/model/student_model.py +++ b/model/student_model.py @@ -8,24 +8,24 @@ class Student(Base): __tablename__ = "wl_student" - id = Column(Integer, primary_key=True, autoincrement=True) - student_number = Column(String(50), nullable=False) - name = Column(String(100)) - gender = Column(String(20)) - birth_date = Column(Date) - id_card_number = Column(String(18)) - phone_number = Column(String(30)) - hometown = Column(String(100)) - graduate_school = Column(String(200)) - education = Column(String(50)) - hobbies = Column(String(500)) - trial_date = Column(Date) - expected_salary = Column(Numeric(12, 2)) - consultant_id = Column(Integer) - class_id = Column(Integer) - payment_method = Column(String(20)) - emergency_contact = Column(String(100)) - remark = Column(String(1000)) - created_at = Column(DateTime) - updated_at = Column(DateTime) - is_deleted = Column(default=False, nullable=False) + id = Column(Integer, primary_key=True, autoincrement=True, comment="id(逻辑主键)") + student_number = Column(String(50), nullable=False, comment="学号(业务主键)") + name = Column(String(100), comment="姓名") + gender = Column(String(20), comment="性别") + birth_date = Column(Date, comment="出生年月") + id_card_number = Column(String(18), comment="身份证号") + phone_number = Column(String(30), comment="电话号码") + hometown = Column(String(100), comment="籍贯") + graduate_school = Column(String(200), comment="毕业学校") + education = Column(String(50), comment="学历") + hobbies = Column(String(500), comment="兴趣爱好") + trial_date = Column(Date, comment="试听日期") + expected_salary = Column(Numeric(12, 2), comment="就业期望薪资") + consultant_id = Column(Integer, comment="顾问id") + class_id = Column(Integer, comment="班级id") + payment_method = Column(String(20), comment="支付方式") + emergency_contact = Column(String(100), comment="紧急联系人") + remark = Column(String(1000), comment="备注") + created_at = Column(DateTime, comment="数据创建时间") + updated_at = Column(DateTime, comment="数据更新时间") + is_deleted = Column(default=False, nullable=False, comment="逻辑删除字段") diff --git a/沃林数智学生管理系统数据库表的设计.xlsx b/沃林数智学生管理系统数据库表的设计.xlsx new file mode 100644 index 0000000..ef7a2da Binary files /dev/null and b/沃林数智学生管理系统数据库表的设计.xlsx differ