123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482 |
- /** 账户类型 */
- enum UserType {
- ENTERPRISE ("企业"),
- PERSONAL ("个人"),
- GOVERNMENT("政府"),
- ORGANIZATION ("组织"),
- PLATFORM ("平台")
- }
- /** 审核状态 */
- enum AuditStatus {
- PENDING ("待审核"),
- PASSED ("已通过"),
- UNPASSED ("未通过")
- }
- /** 评价状态 */
- enum JudgeStatus {
- PENDING ("待评价"),
- PASSED ("已评价")
- }
- /** 实名认证状态 */
- enum VerifiedStatus {
- PENDING ("待认证"),
- VERIFYING ("认证中"),
- PASSED ("已通过"),
- UNPASSED ("未通过")
- }
- /** 机构类型 */
- enum InstitutionType {
- PERFORM("履约机构"),
- UNPERFORM("非履约机构"),
- SINKTRADE("项目减排业主")
- }
- /** 个人认证方式 */
- enum AuthType {
- FACE("人脸识别"),
- IVS("三要素"),
- BANK("银行卡")
- }
- /** 角色 */
- entity Role(sys_role) {
- code String required unique /** 角色编码 */
- name String required unique /** 角色名称 */
- systemed Boolean required /** 是否为系统角色 */
- }
- /** 账户 */
- entity User(sys_user) {
- login String /** 用户名 */
- password String required /** 密码 */
- roleCode String required /** 角色编码 */
- name String /** 企业/个人名称 */
- refId Long /** 账户关联id, 平台为null */
- userType UserType required /** 账户类型 */
- phone String required /** 手机号码 */
- email String /** 企业/个人邮箱 */
- auditStatus AuditStatus /** 审核状态 */
- registApplyTime ZonedDateTime required /** 注册申请时间 */
- registAuditTime ZonedDateTime /** 注册审核时间 */
- auditUnpassedReason String /** 注册审核未通过原因 */
- freezed Boolean required /** 是否已冻结 */
- freezedReason String /** 冻结原因 */
- verifiedStatus VerifiedStatus /** 实名认证状态 */
- verifyUnpassedReason String /** 实名认证未通过原因 */
- authId String /** 实名认证链接申请id */
- authUrl String /** 实名认证链接申请Url */
- disclaimerId String /** 免责声明链接申请id */
- disclaimerSigned Boolean /** 免责声明是否签署 */
- authHasPassed Boolean /** 是否曾认证成功 */
- disclaimerDocId String /** 免责文档id */
- storeId Long /** 店铺信息ID */
- depositPaid Boolean /** 是否已缴纳保证金 */
- }
- /** 企业账户 */
- entity Enterprise(usr_enterprise) {
- userType UserType /** 账户类型 */
- roleCode String required /** 角色编码 */
- auditStatus AuditStatus /** 审核状态 */
- registApplyTime ZonedDateTime /** 注册申请时间 */
- registAuditTime ZonedDateTime /** 注册审核时间 */
- auditUnpassedReason String /** 注册审核未通过原因 */
- greenQualification TextBlob /** 绿色资质json文件 */ // -- 绿色
- name String /** 申请单位名称 */
- phone String /** 联系人手机号 */
- email String /** 联系人邮箱 */
- judgeStatus JudgeStatus /** 评价状态 */ // -- 绿色
- judgeLevel Integer /** 评价等级 */ // -- 绿色
- storeId Long /** 店铺id */
- institutionType InstitutionType /** 机构类型 */
- registAddress String /** 企业注册地(省市) */
- address String /** 企业地址 */
- registMoney Integer /** 注册资本(万元) */
- legalPerson String /** 企业法人 */
- creditCode String /** 统一社会信用代码 */
- license String /** 企业营业执照 */
- businessScope String maxlength(1000) /** 经营范围 */
- contactPerson String /** 联系人 */
- zipCode String /** 邮编 */
- landLine String /** 座机 */
- fax String /** 传真 */
- website String /** 网址 */
- }
- /** 个人账户 */
- entity Personal(usr_personal) {
- userType UserType /** 账户类型 */
- roleCode String required /** 角色编码 */
- auditStatus AuditStatus /** 审核状态 */
- registApplyTime ZonedDateTime /** 注册申请时间 */
- registAuditTime ZonedDateTime /** 注册审核时间 */
- auditUnpassedReason String /** 注册审核未通过原因 */
- storeId Long /** 店铺id */
- name String required /** 姓名 */
- phone String required /** 手机号 */
- email String /** 邮箱 */
- idCardNumber String /** 身份证号 */
- address String /** 详细地址 */
- areaCode String /** 省市区code, 仅存区code即可 */
- areaName String /** 省市区名称 */
- idCardFront String /** 身份证原件(正面) */
- idCardBack String /** 身份证原件(反面) */
- bankCardNo String /** 银行卡号 */
- bankPhone String /** 银行预留手机号 */
- authType String /** 认证选择方式 FACE-人脸; IVS-手机号; BANK-银行卡号 */
- }
- /** 银行账户 */
- entity BankAccount(usr_bank_account) {
- userId Long required /** 账户ID */
- accountName String required /** 户名 */
- accountNumber String required /** 卡号 */
- issuingBank String required /** 开户行 */
- interBankNumber String required /** 联行号 */
- issuingAddress String required /** 开户地 */
- defaultFlag Boolean required /** 是否为默认账户 */
- }
- /** 电子签章记录 */
- entity EsignLog(sys_esign_log) {
- esignType EsignType required /** 业务类型 */
- orderNumber String /** 订单编号 */
- callerId String required /** 业务发起人ID */
- caller String required /** 业务发起人 */
- callTime ZonedDateTime required /** 业务发起时间 */
- succeed Boolean required /** 签章状态 */
- requestParam TextBlob /** 请求参数 */
- responseData TextBlob /** 返回数据 */
- }
- /** 电子签章业务类型 */
- enum EsignType {
- REGIST ("注册"),
- SIGN ("签章"),
- BACK ("契约锁回调")
- }
- /** 银行交易记录 */
- entity BankLog(sys_bank_log) {
- bankLogType BankLogType required /** 业务类型 */
- orderNumber String required /** 订单编号 */
- payerId String required /** 付款人ID */
- payer String required /** 付款人 */
- callTime ZonedDateTime required /** 业务发起时间 */
- payerBank String /** 付款银行 */
- payerAccount String /** 付款账户 */
- amount BigDecimal /** 付款金额 */
- payeeId String /** 收款人ID */
- payee String /** 收款人 */
- payeeBank String /** 收款银行 */
- payeeAccount String /** 收款账户 */
- succeed Boolean required /** 交易状态 */
- requestParam TextBlob /** 请求参数 */
- responseData TextBlob /** 返回数据 */
- }
- /** 银行交易业务类型 */
- enum BankLogType {
- PAY_MARGIN ("支付保证金"),
- PAY_FINAL ("支付尾款"),
- PAY_LOAN ("平台放款"),
- DEFAULT_DEDUCTION ("违约扣款")
- }
- /** 短信发送记录 */
- entity SmsLog(sys_sms_log) {
- smsLogType SmsLogType required /** 业务类型 */
- orderNumber String /** 订单编号 */
- caller String required /** 业务发起人 */
- callTime ZonedDateTime required /** 业务发起时间 */
- templateCode String required /** 模板编码 */
- phoneNumber String required /** 手机号码 */
- succeed Boolean required /** 发送状态 */
- requestParam TextBlob /** 请求参数 */
- responseData TextBlob /** 返回数据 */
- }
- /** 短信发送业务类型 */
- enum SmsLogType {
- COOPERATION("合作留言"),
- CODE_MESSAGE("发送验证码"),
- SYS_REGIST_PASSED("系统添加用户"),
- REGIST_PASSED("商家通过入驻审核"),
- REGIST_UNPASSED("商家未通过入驻审核"),
- ACCOUNT_FREEZED("冻结账户"),
- ACCOUNT_UNFREEZED("解除冻结账户"),
- ACCOUNT_RESET("重置密码"),
- REGIST_BUYER("买家注册")
- }
- /** 新闻动态 */
- entity News(biz_news) {
- title String required /** 标题 */
- newsType NewsType required /** 类型 */
- content TextBlob required /** 内容 */
- linkUrl String /** 访问链接 */
- publishTime ZonedDateTime /** 发布时间 */
- published Boolean required /** 发布状态 */
- }
- /** 新闻动态类型 */
- enum NewsType {
- ENTERPRISE_NEWS ("企业新闻"),
- TRADE_NEWS ("交易动态"),
- MARKET_PRICE ("市场行情"),
- SYSTEM_NOTIFICATION ("系统公告")
- }
- /** 项目类型 */
- enum ProjectType {
- CCER ("CCER"),
- VCS ("VCS"),
- TANPH ("碳普惠")
- }
- /** 项目状态 */
- enum ProjectStatus {
- UN_SALE ("未上架"),
- ON_SALE_AUDIT ("上架中"),
- ON_SALE ("已上架"),
- OFF_SALE ("已下架")
- }
- /** 项目 */
- entity Project(biz_project) {
- projectOwnerId Long required /** 项目业主ID */
- name String required /** 项目名称 */
- code String required /** 项目编码 */
- type ProjectType required /** 项目类型 */
- sinType String required /** 碳汇种类: 农业|林业|海洋|生物质|红树林|其他 */
- price BigDecimal required /** 单价(元/吨) */
- totalCarbonSink BigDecimal required /** 总碳汇量(吨) */
- soldCarbonSink BigDecimal required /** 已售碳汇量(吨) */
- remainingCarbonSink BigDecimal required /** 剩余碳汇量(吨) */
- ptBizUserId Long /** 平台业务员ID */
- province String required /** 项目所在省份 */
- projectArea BigDecimal required /** 项目面积(公顷) */
- projectedEmiReduction BigDecimal required /** 项目计入期内预计减排量(万吨) */
- averageEmiReduction BigDecimal required /** 年均减排量(万吨) */
- startTime ZonedDateTime required /** 项目开始时间 */
- endTime ZonedDateTime required /** 项目结束时间 */
- monitorTimes String required /** 碳汇成熟年份 */
- methodology String required /** 方法学编号 */
- methodologyName String required /** 方法学名称 */
- issuingAgency String required /** 减排量签发机构 */
- displayOrder Integer required /** 项目展示顺序 */
- shopDisplayOrder Integer required /** 项目店铺内展示顺序 */
- slogan String required /** 项目标语 */
- overviewTitle String required /** 项目简介-标题 */
- overviewContent TextBlob required /** 项目简介-正文 */
- storyTitle String required /** 项目故事-标题 */
- storyContent TextBlob required /** 项目故事-正文 */
- storyEnding TextBlob required /** 项目故事-结尾 */
- storyImage String required /** 项目故事-图片 */
- images TextBlob required /** 项目图片 */
- longitude Long required /** 项目位置(经度) */
- latitude Long required /** 项目位置(纬度) */
- circle TextBlob /** 项目的地图圈 */
- projectFiles TextBlob required /** 项目文件 */
- projectStatus ProjectStatus required /** 项目状态 */
- bizAuditFlag Boolean /** 上架中时业务员是否审批 */
- creator String required /** 录入人名称 */
- createTime ZonedDateTime required /** 录入时间 */
- highQuality Boolean required /** 是否优质项目 */
- }
- /** 项目快照 */
- entity ProjectSnapshot(biz_project_snapshot) {
- projectOwnerId Long required /** 项目业主ID */
- projectId Long required /** 项目ID */
- name String required /** 项目名称 */
- code String required /** 项目编码 */
- type ProjectType required /** 项目类型 */
- sinType String required /** 碳汇种类: 农业|林业|海洋|生物质|红树林|其他 */
- price BigDecimal required /** 单价(元/吨) */
- totalCarbonSink BigDecimal required /** 总碳汇量(吨) */
- soldCarbonSink BigDecimal required /** 已售碳汇量(吨) */
- remainingCarbonSink BigDecimal required /** 剩余碳汇量(吨) */
- ptBizUserId Long /** 平台业务员ID */
- province String required /** 项目所在省份 */
- projectArea BigDecimal required /** 项目面积(公顷) */
- projectedEmiReduction BigDecimal required /** 项目计入期内预计减排量(万吨) */
- averageEmiReduction BigDecimal required /** 年均减排量(万吨) */
- startTime ZonedDateTime required /** 项目开始时间 */
- endTime ZonedDateTime required /** 项目结束时间 */
- monitorTimes String required /** 碳汇成熟年份 */
- methodology String required /** 方法学编号 */
- methodologyName String required /** 方法学名称 */
- issuingAgency String required /** 减排量签发机构 */
- displayOrder Integer required /** 项目展示顺序 */
- shopDisplayOrder Integer required /** 项目店铺内展示顺序 */
- slogan String required /** 项目标语 */
- overviewTitle String required /** 项目简介-标题 */
- overviewContent TextBlob required /** 项目简介-正文 */
- storyTitle String required /** 项目故事-标题 */
- storyContent TextBlob required /** 项目故事-正文 */
- storyEnding TextBlob required /** 项目故事-结尾 */
- storyImage String required /** 项目故事-图片 */
- images TextBlob required /** 项目图片 */
- longitude Long required /** 项目位置(经度) */
- latitude Long required /** 项目位置(纬度) */
- circle TextBlob /** 项目的地图圈 */
- projectFiles TextBlob required /** 项目文件 */
- projectStatus ProjectStatus required /** 项目状态 */
- bizAuditFlag Boolean /** 上架中时业务员是否审批 */
- creator String required /** 录入人名称 */
- createTime ZonedDateTime required /** 录入时间 */
- highQuality Boolean required /** 是否优质项目 */
- }
- /** 购物车 */
- entity ShoppingCart(biz_cart) {
- buyerId Long required unique /** 买方ID */
- projectInfo TextBlob required /** 采购明细 */
- }
- /** 订单状态 */
- enum OrderStatus {
- UNCONFIRMED("待确认"),
- FINISHED("已完成")
- }
- /** 订单 */
- entity Order(biz_order) {
- orderNumber String required unique /** 订单编号 */
- projectSnapshotId Long required /** 项目快照ID */
- price BigDecimal required /** 单价(元/吨) */
- amount BigDecimal required /** 数量(吨) */
- totalPrice BigDecimal required /** 总价(元) */
- earnest BigDecimal required /** 意向金(元) */
- sellerId Long required /** 卖方ID */
- sellerName String required /** 卖方name */
- buyerId Long required /** 买方ID */
- buyerName String required /** 买方name */
- orderStatus OrderStatus required /** 订单状态 */
- createTime ZonedDateTime required /** 创建时间 */
- confirmTime ZonedDateTime /** 确认时间 */
- finishTime ZonedDateTime /** 完成时间 */
- sellerRated Boolean required /** 卖方评价状态 */
- sellerRatedTime ZonedDateTime /** 卖方评价时间 */
- sellerRatedInfo TextBlob /** 卖方评价信息 */
- buyerRated Boolean required /** 买方评价状态 */
- buyerRatedTime ZonedDateTime /** 买方评价时间 */
- buyerRatedInfo TextBlob /** 买方评价信息 */
- receiptInfo TextBlob /** 交易回执单信息 */
- receiptContractId String /** 回执单合同ID */
- receiptDocumentId String /** 回执单合同ID */
- }
- /** 登录日志 */
- entity SysLoginLog {
- userId Long /** 用户ID */
- login String /** 登录账号 */
- ip String /** 来源IP */
- loginTime Instant /** 登录时间 */
- success Boolean /** 是否登录成功 */
- }
- /** 联系我们 */
- entity Cooperation(biz_cooperation) {
- consultingType String required /** 咨询类型 */
- name String required /** 联系人 */
- companyName String required /** 公司名称 */
- phoneNumber String required /** 联系电话 */
- email String /** 电子邮箱 */
- otherRequirement TextBlob /** 其他需求 */
- messageTime ZonedDateTime /** 留言时间 */
- }
- /*
- * ---------- Stage 2 ------------
- * @Date 230330
- * @ApiNote Stage 2 , Modify
- * @author czz
- */
- /** 店铺信息 */
- entity Shop(shop) {
- name String required unique /** 店铺名称 notNull */
- slogan String /** 店铺标语 */
- logo String /** 店铺logo */
- banner String /** 店铺横幅 */
- ownerId Long /** 业主id(UserId) */
- userType UserType /** 卖家用户类型 */
- createTime ZonedDateTime /** 首次开店时间 */
- refId Long /** 关联信息id(企业|政府|个人) */
- }
- /** 浏览历史足迹 */
- entity VisitTrack(visit_track) {
- visitTime ZonedDateTime /** 浏览时间 */
- visitDate LocalDate /** 浏览日期 */
- shopId Long /** 店铺id */
- shopName String /** 店铺名称 */
- projectId Long /** 项目ID */
- projectName String /** 项目名称 */
- type String /** 类型: 1-店铺|2-项目 */
- userId Long /** 所属用户id */
- visitCount Integer /** 当日访问次数 */
- }
- /** 收藏 */
- entity ShoppingCollection(shopping_collection) {
- collectTime ZonedDateTime /** 浏览时间 */
- collectDate LocalDate /** 浏览日期 */
- shopId Long /** 店铺id */
- shopName String /** 店铺名称 */
- projectId Long /** 项目ID */
- projectName String /** 项目名称 */
- type String /** 类型: 1-店铺|2-项目 */
- userId Long /** 所属用户id */
- }
- /** 验证码 */
- entity VerificationCode(verification_code) {
- sendTime ZonedDateTime /** 发送时间 */
- expiredTime ZonedDateTime /** 到期时间 */
- phone String /** 手机号 */
- code String /** 验证码 */
- type String /** 验证码类型(注册校验-signUp|登录校验-signIn|更改校验-edit|查看入驻审核进度校验-checkAudit) */
- used Boolean /** 验证码是否已被使用 */
- }
- /** 微信支付记录 */
- entity WechatPayRecord(wechat_pay_record) {
- payTime ZonedDateTime required /** 支付时间 */
- outTradeNo String required unique /** 订单号 */
- orderInfo TextBlob required /** 订单信息 */
- notifyId String /** 通知ID */
- notifyTime ZonedDateTime /** 回调时间 */
- transactionId String /** 微信支付订单号 */
- tradeType String /** 交易类型 */
- tradeState String /** 交易状态 */
- tradeStateDesc String /** 交易状态描述 */
- successTime ZonedDateTime /** 支付成功时间 */
- version Integer /** 乐观锁 */
- }
- /**
- relationship OneToMany {
- User to BankAccount
- User to Project
- User to Order
- ShoppingCart to Project
- }
- relationship OneToOne {
- User to Role
- User to Enterprise
- User to Personal
- User to ShoppingCart
- ProjectSnapshot to Order
- }
- */
|