diff --git a/docs/sql/codo_biz.sql b/docs/sql/codo_biz.sql new file mode 100644 index 0000000..d6132fe --- /dev/null +++ b/docs/sql/codo_biz.sql @@ -0,0 +1,5 @@ +INSERT INTO `codo_biz` (`create_time`, `id`, `biz_id`, `biz_en_name`, `biz_cn_name`, `maintainer`, `biz_sre`, `biz_developer`, `biz_tester`, `biz_pm`, `ext_info`, `users_info`, `corporate`, `sort`, `life_cycle`, `description`, `update_time`) VALUES ('2023-03-15 13:04:00', 1, '500', 'all', '所有项目', NULL, NULL, NULL, NULL, NULL, NULL, '[]', '', 9, '已上线', '', '2023-03-15 13:04:00'); +INSERT INTO `codo_biz` (`create_time`, `id`, `biz_id`, `biz_en_name`, `biz_cn_name`, `maintainer`, `biz_sre`, `biz_developer`, `biz_tester`, `biz_pm`, `ext_info`, `users_info`, `corporate`, `sort`, `life_cycle`, `description`, `update_time`) VALUES ('2023-03-15 13:04:00', 2, '501', 'public', '公共项目', NULL, NULL, NULL, NULL, NULL, NULL, '[]', '', 10, '已上线', '', '2023-03-15 13:04:00'); +INSERT INTO `codo_biz` (`create_time`, `id`, `biz_id`, `biz_en_name`, `biz_cn_name`, `maintainer`, `biz_sre`, `biz_developer`, `biz_tester`, `biz_pm`, `ext_info`, `users_info`, `corporate`, `sort`, `life_cycle`, `description`, `update_time`) VALUES ('2023-03-15 13:04:46', 3, '502', 'default', '默认项目', NULL, NULL, NULL, NULL, NULL, NULL, '[]', '', 10, '已上线', '默认项目', '2023-03-15 13:04:46'); +INSERT INTO `codo_biz` (`create_time`, `id`, `biz_id`, `biz_en_name`, `biz_cn_name`, `maintainer`, `biz_sre`, `biz_developer`, `biz_tester`, `biz_pm`, `ext_info`, `users_info`, `corporate`, `sort`, `life_cycle`, `description`, `update_time`) VALUES ('2023-08-02 16:47:07', 4, '503', 'opstest', '运维测试', NULL, NULL, NULL, NULL, NULL, NULL, '[]', '', 100, '已上线', '', '2023-08-17 14:27:17'); +INSERT INTO `codo_biz` (`create_time`, `id`, `biz_id`, `biz_en_name`, `biz_cn_name`, `maintainer`, `biz_sre`, `biz_developer`, `biz_tester`, `biz_pm`, `ext_info`, `users_info`, `corporate`, `sort`, `life_cycle`, `description`, `update_time`) VALUES ('2023-08-02 16:47:30', 6, '504', 'ops', '运维项目', NULL, NULL, NULL, NULL, NULL, NULL, '[]', '', 100, '已上线', '', '2023-08-11 14:48:18'); \ No newline at end of file diff --git a/libs/utils.py b/libs/utils.py deleted file mode 100644 index 71783c2..0000000 --- a/libs/utils.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -""" -Contact : 191715030@qq.com -Author : shenshuo -Date : 2018/12/11 -Desc : -""" - -if __name__ == '__main__': - pass diff --git a/models/biz_model.py-bak b/models/biz_model.py-bak deleted file mode 100644 index a362d5e..0000000 --- a/models/biz_model.py-bak +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -""" -Version : 0.0.1 -Contact : 191715030@qq.com -Author : shenshuo -Date : 2021/11/10 14:33 -Desc : 解释一下吧 -""" - -from sqlalchemy import Column, String, Integer, DateTime, JSON, Boolean, asc, desc -from sqlalchemy.ext.declarative import declarative_base -from datetime import datetime - -Base = declarative_base() - - -class TimeBaseModel(object): - """模型基类,为模型补充创建时间与更新时间""" - id = Column('id', Integer, primary_key=True, autoincrement=True) - create_time = Column(DateTime, nullable=False, default=datetime.now, index=True) # 记录的创建时间 - update_time = Column(DateTime, nullable=False, default=datetime.now, onupdate=datetime.now, index=True) # 记录的更新时间 - - -class BusinessModel(TimeBaseModel, Base): - __tablename__ = 'mg_biz_list' - - id = Column('id', Integer, primary_key=True, autoincrement=True) - business_id = Column('business_id', String(11), index=True, unique=True) - business_en = Column('business_en', String(80), unique=True, index=True) ###业务英文命 - business_zh = Column('business_zh', String(80), index=True, default='') ###业务中文名 - resource_group = Column('resource_group', String(80), index=True, default='') ###资源组名 / 资源隔离名 - maintainer = Column('maintainer', JSON(), default="") - # user_list = Column('user_list', JSON(), default=[]) - # group_list = Column('group_list', JSON(), default=[]) - corporate = Column('corporate', String(255), default="") ### 公司实体 - sort = Column('sort', Integer, default=10, index=True) ### 排序 - life_cycle = Column('life_cycle', String(15), default='已上线', index=True) ### 开发中 测试中 已上线 停运 - description = Column('description', String(255), default='') ### 描述、备注 - - # business_group = Column('business_group', String(50), default='') ### 业务集 CMS/OPS - # client_group_id = Column('client_group_id', String(11), nullable=True) ### 租户组id - # map_client_id = Column('map_client_id', Integer, index=True, nullable=True) - # __mapper_args__ = {"order_by": (sort, business_en)}