Files
jyls_django/User/models.py
2025-12-30 15:55:20 +08:00

44 lines
2.2 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
from django.db import models
from business.models import role
# Create your models here.
class Department(models.Model):
username = models.CharField(max_length=100) # 部门名称
class User(models.Model):
role = models.ManyToManyField(role)
department =models.ManyToManyField(Department) # 归属部门
username = models.CharField(max_length=100, unique=True) # 姓名
account = models.CharField(max_length=100) # 账号
password = models.CharField(max_length=100) # 密码
ethnicity = models.CharField(max_length=100) # 名族
card = models.CharField(max_length=100) # 身份证
mobilePhone = models.CharField(max_length=100) # 手机号
position = models.CharField(max_length=100) # 岗位
team = models.CharField(max_length=100) # 所属团队
Dateofjoining = models.DateField() # 入职时间
Confirmationtime = models.DateField(null=True, blank=True, default=None) # 转正时间
Practicingcertificatetime = models.DateField(null=True, blank=True, default=None) # 执业证时间
Dateofdeparture = models.DateField(null=True, blank=True, default=None) # 离职时间
AcademicResume = models.TextField() # 学业简历
academic = models.TextField() # 学历
contract = models.TextField() # 合同
ApplicationForm = models.TextField() # 入职申请表
salary = models.CharField(max_length=100,null=True, blank=True, default=None) # 工资
state = models.CharField(max_length=100) # 状态
token = models.TextField()
class Approval(models.Model):
title = models.CharField(max_length=100)
content = models.TextField() # 内容
times = models.DateField() # 提交时间
completeTiem = models.DateField(null=True, blank=True, default=None) # 完成时间
personincharge = models.CharField(max_length=100) # 负责人/审批部门
# 统一规则:
# - 纯数字字符串(如 "1", "2"= 部门ID该部门下所有人员都能看到审批
# - 非纯数字字符串(如 "张三"= 审批员用户名(只有该审批员能看到审批)
state = models.CharField(max_length=100) # 状态
type = models.CharField(max_length=100) # 类别
user_id = models.CharField(max_length=100) # 事件id