You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tianze-pro/doc/sql/mysql/3.tianze-pro-account.sql

51 lines
3.0 KiB
SQL

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
drop table if exists student_account_asset_allocation;
CREATE TABLE `student_account_asset_allocation` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`student_id` bigint(20) DEFAULT NULL COMMENT '学生ID',
`application_id` bigint(20) DEFAULT NULL COMMENT '应用ID',
`universities_colleges_id` bigint(20) DEFAULT NULL COMMENT '院校ID',
`name` varchar(100) DEFAULT NULL COMMENT '账户名称',
`state` tinyint(2) DEFAULT NULL COMMENT '账户开通状态 1未开通 2已开通',
`initial_capital` decimal(15,2) DEFAULT NULL COMMENT '期初资金',
`available_funds` decimal(15,2) DEFAULT NULL COMMENT '可用资金',
`into_account` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '转入账户',
`transfer_amount` decimal(15,2) DEFAULT NULL COMMENT '转账金额',
`transferIn_amount` decimal(15,2) DEFAULT NULL COMMENT '转入金额',
`transfer_out_amount` decimal(15,2) DEFAULT NULL COMMENT '转出金额',
`initial_investment_capital` decimal(15,2) DEFAULT NULL COMMENT '期初投资资金',
`borrowed_funds` decimal(15,2) DEFAULT NULL COMMENT '借入资金',
`investment_funds` decimal(15,2) DEFAULT NULL COMMENT '投资资金',
`investment_value` decimal(15,2) DEFAULT NULL COMMENT '投资市值',
`investment_income` decimal(15,2) DEFAULT NULL COMMENT '投资收益',
`total_assets_of_sub_accounts` decimal(15,2) DEFAULT NULL COMMENT '子账户总资产',
`asset_Investment` decimal(15,2) DEFAULT NULL COMMENT '总资产投资收益率',
`return_on_equity` decimal(15,2) DEFAULT NULL COMMENT '净资产收益率',
`is_update` tinyint(2) DEFAULT NULL COMMENT '是否给予初始值 1未给 2已给',
`amount_frozen` decimal(15,2) DEFAULT NULL COMMENT '冻结金额',
`update_version` bigint(20) DEFAULT NULL COMMENT '乐观锁',
`update_by` varchar(100) DEFAULT NULL COMMENT '修改人',
`update_time` datetime DEFAULT NULL COMMENT '修改时间',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`is_del` tinyint(2) DEFAULT '0' COMMENT '是否删除 1正常2删除',
`user_id` bigint(20) DEFAULT NULL COMMENT '用户ID',
`org_id` bigint(20) DEFAULT NULL COMMENT '机构ID',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='学生资产账户';
drop table if exists student_account_trading_record_sheet;
CREATE TABLE `student_account_trading_record_sheet` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`transaction_amount` decimal(15,0) DEFAULT NULL COMMENT '转入金额',
`transfer_type` varchar(255) DEFAULT NULL COMMENT '转入类型',
`exit_type` varchar(255) DEFAULT NULL COMMENT '转出类型',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`student_id` bigint(20) DEFAULT NULL COMMENT '学生ID',
`user_Id` bigint(20) DEFAULT NULL COMMENT '用户ID',
`org_id` bigint(20) DEFAULT NULL COMMENT '机构ID',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='学生资产账户交易流水';