企业管理:企业认证
今天我们来学习企业的创建和认证功能首先就是要准备的,企业表,企业认证表
一般一张表字段数量 15左右
外建: 物理关联。mysql
int: 逻辑关联。
企业表
id | ||||
企业名称 | ||||
企业Code | ||||
城市ID | 外建 | |||
账号状态 | int | 正常, 待审核, 封禁 | ||
创建时间 | 日期时间 | |||
认证时间 | 日期时间 | |||
认证类型 | int | 0:无认证 1:企业认证 +2:营业执照认证 3:企业认证 + 营业执照认证 | ||
风险等级 | int | 低风险, 中风险,高风险 | ||
黑名单状态 | int | 封禁,未封禁 | ||
投诉次数 | int | |||
公司网站 | 字符串 | |||
电子邮箱 | 字符串 | |||
审核类型 | int | 新企业认证, 资质更新, 信息变更 | ||
提交时间 | 日期时间 |
资质材料表
ID | |||
联系人姓名 | 字符串 | ||
联系电话 | 字符串 | ||
联系邮箱 | 字符串 | ||
营业执照图片url | 字符串 | ||
法人身份证(正面)图片url | 字符串 | ||
法人身份证(反面 图片url | 字符串 | ||
组织机构代码证 | 字符串 | ||
企业表 | int |
企业信息表
from tortoise import fields, models class Enterprise(models.Model): id = fields.IntField(pk=True) name = fields.CharField(max_length=255, description="企业名称") registration_number = fields.CharField(max_length=50, unique=True, description="注册号") legal_representative = fields.CharField(max_length=100, description="法定代表人") registered_capital = fields.DecimalField(max_digits=20, decimal_places=2, description="注册资本") establishment_date = fields.DateField(description="成立日期") business_scope = fields.TextField(description="经营范围") address = fields.CharField(max_length=255, description="注册地址") contact_phone = fields.CharField(max_length=20, description="联系电话") email = fields.CharField(max_length=100, description="邮箱") status = fields.CharField(max_length=50, description="企业状态(存续、注销等)") industry = fields.CharField(max_length=100, description="所属行业") created_at = fields.DatetimeField(auto_now_add=True) updated_at = fields.DatetimeField(auto_now=True) class Meta: table = "enterprise" table_description = "企业信息表"```python @boss-company-ui/src/pages/company/Certification.vue:592-602 点击确认提交, 调用后端接口:curl -X 'POST' \ 'http://localhost:8000/enterprise/save' \ -H 'accept: application/json' \ -H 'Content-Type: multipart/form-data' \ -F 'legal_representative=2121' \ -F 'company_scale=1' \ -F 'enterprise_name=string2121' \ -F 'contact_name=1' \ -F 'registered_capital=2121' \ -F 'register_status=1' \ -F 'unified_social_credit_code=21212' \ -F 'contact_phone=1' \ -F 'legal_id_front_file=@4月12日-封面.jpg;type=image/jpeg' \ -F 'establish_date=2026-09-09' \ -F 'business_scope=1' \ -F 'financing_stage=1' \ -F 'legal_id_back_file=@4月12日-封面.jpg;type=image/jpeg' \ -F 'business_license_file=@4月12日-封面.jpg;type=image/jpeg' \ -F 'org_code_cert=1' \ -F 'headquarters_address=1' \ -F 'industry_id=1' \ -F 'contact_email=1' enterprise_name:企业名称 unified_social_credit_code:统一社会信用代码 legal_representative: str 法人代表 registered_capital: str 注册资本 establish_date: date 成立日期 register_status: int登记状态 """登记状态""" CONTINUE = 1 # 存续 IN_BUSINESS = 2 # 在业 OPEN = 3 # 开业 SUSPENDED = 4 # 停业 LIQUIDATION = 5 # 清算 REVOKED = 6 # 吊销 CANCELLED = 7 # 注销 industry_id: int 所属行业 company_scale: int 公司规模 """公司规模""" SCALE_0_20 = 1 # 0-20人 SCALE_20_99 = 2 # 20-99人 SCALE_100_499 = 3 # 100-499人 SCALE_500_999 = 4 # 500-999人 SCALE_1000_9999 = 5 # 1000-9999人 SCALE_10000_PLUS = 6 # 10000人以上 financing_stage: int 融资阶段(可为空) """融资阶段,允许为空""" ANGEL = 1 # 天使轮 A_ROUND = 2 # A轮 B_ROUND = 3 # B轮 C_ROUND = 4 # C轮 D_PLUS = 5 # D轮及以上 LISTED = 6 # 已上市 NO_NEED_FUND = 7 # 不需要融资 headquarters_address: str 总部地址 business_scope: str经营范围 contact_name: str 联系人姓名 contact_phone: str 联系电话 contact_email: str 联系邮箱 org_code_cert: str 组织机构代码证 ```