Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fzm-joying
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lei
fzm-joying
Commits
3d8eab2f
Commit
3d8eab2f
authored
Jul 09, 2021
by
tangtuo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加入测试环境配置
parent
8646021d
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
412 additions
and
18 deletions
+412
-18
application-test.yml
joying-admin/src/main/resources/application-test.yml
+104
-0
logback-spring.xml
joying-admin/src/main/resources/logback-spring.xml
+9
-0
NftServiceImpl.java
...main/java/com/fzm/common/service/impl/NftServiceImpl.java
+24
-6
application-test.yml
joying-portal/src/main/resources/application-test.yml
+116
-0
application.yml
joying-portal/src/main/resources/application.yml
+4
-1
logback-spring.xml
joying-portal/src/main/resources/logback-spring.xml
+9
-0
joying.sql
sql/joying.sql
+146
-11
No files found.
joying-admin/src/main/resources/application-test.yml
0 → 100644
View file @
3d8eab2f
server
:
port
:
8002
spring
:
application
:
name
:
joying-admin
main
:
allow-bean-definition-overriding
:
true
#当遇到同样名字的时候,是否允许覆盖注册
datasource
:
url
:
jdbc:mysql://172.16.101.135:3306/fzm_joying_test?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8
username
:
root
password
:
123456
platform
:
mysql
type
:
com.alibaba.druid.pool.DruidDataSource
driver-class-name
:
com.mysql.cj.jdbc.Driver
druid
:
initial-size
:
5
min-idle
:
5
max-active
:
20
max-wait
:
60000
time-between-eviction-runs-millis
:
60000
min-evictable-idle-time-millis
:
300000
validation-query
:
SELECT 1 FROM DUAL
test-while-idle
:
true
test-on-borrow
:
false
test-on-return
:
false
pool-prepared-statements
:
false
max-pool-prepared-statement-per-connection-size
:
20
filters
:
stat ,wall
connection-properties
:
druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
useGlobalDataSourceStat
:
true
redis
:
host
:
172.16.101.136
port
:
6379
password
:
123456
lettuce
:
pool
:
# 连接池最大连接数(使用负值表示没有限制) 默认 8
max-active
:
100
# 连接池最大阻塞等待时间(使用负值表示没有限制) 默认 -1
max-wait
:
-1
# 连接池中的最大空闲连接 默认 8
max-idle
:
8
# 连接池中的最小空闲连接 默认 0
min-idle
:
0
cache
:
# 整合SpringCache,redis作为缓存类型
type
:
redis
redis
:
# 缓存失效时间
time-to-live
:
86400000
# sa-token配置
sa-token
:
# token名称 (同时也是cookie名称)
token-name
:
Authorization
# token有效期,单位s, -1代表永不过期
timeout
:
7200
# token临时有效期 (指定时间内无操作就视为token过期) 单位: 秒
activity-timeout
:
3600
# 在多人登录同一账号时,是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token)
is-share
:
false
# token风格
#token-style: uuid
# 是否输出操作日志
is-log
:
false
tokenPrefix
:
Bearer
# 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
is-concurrent
:
false
swagger
:
title
:
乐映影视
description
:
乐映影视后台管理系统RESTFUL API
version
:
1.0.0
base-package
:
com.fzm.admin.controller
base-path
:
/**
enabled
:
true
globalOperationParameters
:
-
description
:
Authorization
modelRef
:
string
name
:
Authorization
parameterType
:
header
required
:
false
contact
:
name
:
tangtuo
email
:
ttuo@33.com
chain
:
para
:
rpc-url
:
http://172.16.101.133:8801
withhold-addr
:
1Ae6FfgdYJn6LLaqDoRjwga3j4TTmMq3t7
withhold-key
:
a4c49dcb35e0032dc8db5891dc81481943b68fc558ce93ce74d0382c1d104934
title
:
user.p.joying.
admin
:
16naUoLwjNUgMhGVRmL3xTVpCso2DJp8JZ
admin-key
:
8cd19e9bf39055f95e3e33cc1e08b9f9fc2e9be48a5b3a4d401e64041c97aec7
contract-name
:
user.evm.0xd996a3a866c577596df260844a045a068ec5accd8d71ccaa3d578c9617ec5490
contract-address
:
1iDWTHZQxPES4hLveZRcwJH6AMaMfZfZZ
aliyun
:
oss
:
app-key
:
LTAI5tHGn7cVJdEtihTFLSeB
app-secret
:
XYmfBSbLaZoblGXZwIXkbhfBD7a1eg
end-point
:
oss-cn-hangzhou.aliyuncs.com
simple-bucket
:
test-nft
encrypt-bucket
:
test-nft-2
joying-admin/src/main/resources/logback-spring.xml
View file @
3d8eab2f
...
...
@@ -13,6 +13,9 @@
<springProfile
name=
"dev"
>
<property
name=
"LOG_HOME"
value=
"logs"
/>
</springProfile>
<springProfile
name=
"test"
>
<property
name=
"LOG_HOME"
value=
"logs"
/>
</springProfile>
<!-- 彩色日志 -->
...
...
@@ -118,6 +121,11 @@
<appender-ref
ref=
"DOCKER_LOGS"
/>
<appender-ref
ref=
"INFO_FILE"
/>
</springProfile>
<springProfile
name=
"test"
>
<!-- <appender-ref ref="CONSOLE" />-->
<appender-ref
ref=
"DOCKER_LOGS"
/>
<appender-ref
ref=
"INFO_FILE"
/>
</springProfile>
</root>
</configuration>
\ No newline at end of file
joying-common/src/main/java/com/fzm/common/service/impl/NftServiceImpl.java
View file @
3d8eab2f
...
...
@@ -2,6 +2,8 @@ package com.fzm.common.service.impl;
import
cn.dev33.satoken.stp.StpUtil
;
import
cn.fzm.chain.simplesdk.client.ParaChainClient
;
import
cn.fzm.chain.simplesdk.constant.TxStatusEnum
;
import
cn.fzm.chain.simplesdk.model.TxResult
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.date.DateTime
;
import
cn.hutool.core.date.DateUtil
;
...
...
@@ -81,23 +83,21 @@ public class NftServiceImpl extends ServiceImpl<NftMapper, Nft> implements NftSe
nftDto
.
setId
(
nft
.
getId
());
nftDto
.
setFileHash
(
nft
.
getFileHash
());
return
nftDto
;
/*
*/
}
@Override
public
Boolean
publish
(
NftDto
nftDto
)
{
// 获取用户的私钥
User
user
=
userService
.
getById
(
StpUtil
.
getLoginIdAsInt
());
String
wallet
=
user
.
getWallet
();
String
privkey
=
paraChainClient
.
walletDumpPrivkey
(
user
.
getWallet
());
// 获取用户的私钥
String
privkey
=
paraChainClient
.
walletDumpPrivkey
(
wallet
);
// 发行nft
String
txHash
=
paraChainClient
.
evmPublishNFT1155
(
contractName
,
wallet
,
privkey
,
1
,
true
);
if
(
StringUtils
.
isBlank
(
txHash
)
||
!
txHash
.
contains
(
"-"
))
{
throw
GlobalException
.
newException
(
ResultCode
.
FAILED
,
"nft发行失败"
);
}
String
[]
split
=
txHash
.
split
(
"-"
);
String
hash
=
split
[
0
];
long
tokenId
=
Long
.
parseLong
(
split
[
1
]);
Nft
nft
=
getById
(
nftDto
.
getId
());
// 构建上链信息
...
...
@@ -108,9 +108,11 @@ public class NftServiceImpl extends ServiceImpl<NftMapper, Nft> implements NftSe
String
tokenInfo
=
JsonUtil
.
toJson
(
map
);
log
.
info
(
"加密上链数据: {}"
,
tokenInfo
);
String
tradeHash
=
paraChainClient
.
evmSetTokenInfo
(
contractName
,
tokenId
,
tokenInfo
,
wallet
,
privkey
,
true
);
System
.
out
.
println
(
hash
.
equals
(
tradeHash
));
if
(
StringUtils
.
isBlank
(
tradeHash
))
{
throw
GlobalException
.
newException
(
ResultCode
.
FAILED
,
"nft发行失败"
);
}
paraChainClient
.
cycleConfirmTxWithHash
(
hash
,
true
,
1200
);
nft
.
setNftHash
(
split
[
0
]);
nft
.
setTokenId
(
tokenId
);
nft
.
setPublishTime
(
new
Date
());
...
...
@@ -118,6 +120,22 @@ public class NftServiceImpl extends ServiceImpl<NftMapper, Nft> implements NftSe
return
updateById
(
nft
);
}
public
Boolean
checkResult
(
String
nftHash
)
{
TxResult
txResult
=
paraChainClient
.
confirmTxWithGrpTxHash
(
nftHash
);
if
(
TxStatusEnum
.
RUNNING
.
equals
(
txResult
.
getStatus
()))
{
try
{
Thread
.
sleep
(
1000
);
}
catch
(
InterruptedException
e
)
{
e
.
printStackTrace
();
}
checkResult
(
nftHash
);
}
if
(
TxStatusEnum
.
FAIL
.
equals
(
txResult
.
getStatus
()))
{
throw
GlobalException
.
newException
(
ResultCode
.
FAILED
,
String
.
format
(
"nft发行失败,原因是:{}"
,
txResult
.
getErrMsg
()));
}
return
true
;
}
@Override
public
List
<
Nft
>
list
(
Integer
pageNum
,
Integer
pageSize
,
Integer
categoryId
)
{
return
nftMapper
.
list
(
pageNum
,
pageSize
,
categoryId
);
...
...
joying-portal/src/main/resources/application-test.yml
0 → 100644
View file @
3d8eab2f
server
:
port
:
8001
spring
:
main
:
allow-bean-definition-overriding
:
true
#当遇到同样名字的时候,是否允许覆盖注册
datasource
:
url
:
jdbc:mysql://172.16.101.135:3306/fzm_joying_test?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8
username
:
root
password
:
123456
platform
:
mysql
type
:
com.alibaba.druid.pool.DruidDataSource
driver-class-name
:
com.mysql.cj.jdbc.Driver
druid
:
initial-size
:
5
min-idle
:
5
max-active
:
20
max-wait
:
60000
time-between-eviction-runs-millis
:
60000
min-evictable-idle-time-millis
:
300000
validation-query
:
SELECT 1 FROM DUAL
test-while-idle
:
true
test-on-borrow
:
false
test-on-return
:
false
pool-prepared-statements
:
false
max-pool-prepared-statement-per-connection-size
:
20
filters
:
stat ,wall
connection-properties
:
druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
useGlobalDataSourceStat
:
true
redis
:
host
:
172.16.101.136
port
:
6379
password
:
123456
lettuce
:
pool
:
# 连接池最大连接数(使用负值表示没有限制) 默认 8
max-active
:
100
# 连接池最大阻塞等待时间(使用负值表示没有限制) 默认 -1
max-wait
:
-1
# 连接池中的最大空闲连接 默认 8
max-idle
:
8
# 连接池中的最小空闲连接 默认 0
min-idle
:
0
cache
:
# 整合SpringCache,redis作为缓存类型
type
:
redis
rabbitmq
:
host
:
172.16.101.135
port
:
5672
username
:
admin
password
:
admin
listener
:
simple
:
####开启手动签收
acknowledge-mode
:
manual
# sa-token配置
sa-token
:
# token名称 (同时也是cookie名称)
token-name
:
Authorization
# token有效期,单位s 默认30天, -1代表永不过期
timeout
:
86400
# token临时有效期 (指定时间内无操作就视为token过期) 单位: 秒
activity-timeout
:
3600
# 在多人登录同一账号时,是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token)
is-share
:
false
# token风格
#token-style: uuid
# 是否输出操作日志
is-log
:
true
tokenPrefix
:
Bearer
# 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
is-concurrent
:
false
swagger
:
title
:
乐映影视
description
:
乐映影视门户系统RESTFUL API
version
:
1.0.0
base-package
:
com.fzm.portal.controller
base-path
:
/**
enabled
:
true
globalOperationParameters
:
-
description
:
Authorization
modelRef
:
string
name
:
Authorization
parameterType
:
header
required
:
false
contact
:
name
:
tangtuo
email
:
ttuo@33.com
sms
:
app-key
:
Yiru
app-secret
:
mx5oaR^RY8!(ziHn
message-login-codetype
:
quick
email-login-codetype
:
quick
voice-login-codetype
:
quick
send-sms-url
:
http://118.31.52.32/send/sms2
validate-code-url
:
http://118.31.52.32/validate/code
chain
:
para
:
rpc-url
:
http://172.16.101.133:8801
withhold-addr
:
1Ae6FfgdYJn6LLaqDoRjwga3j4TTmMq3t7
withhold-key
:
a4c49dcb35e0032dc8db5891dc81481943b68fc558ce93ce74d0382c1d104934
title
:
user.p.joying.
admin
:
16naUoLwjNUgMhGVRmL3xTVpCso2DJp8JZ
admin-key
:
8cd19e9bf39055f95e3e33cc1e08b9f9fc2e9be48a5b3a4d401e64041c97aec7
contract-name
:
user.evm.0xd996a3a866c577596df260844a045a068ec5accd8d71ccaa3d578c9617ec5490
contract-address
:
1iDWTHZQxPES4hLveZRcwJH6AMaMfZfZZ
aliyun
:
oss
:
app-key
:
LTAI5tHGn7cVJdEtihTFLSeB
app-secret
:
XYmfBSbLaZoblGXZwIXkbhfBD7a1eg
end-point
:
oss-cn-hangzhou.aliyuncs.com
simple-bucket
:
test-nft
encrypt-bucket
:
test-nft-2
joying-portal/src/main/resources/application.yml
View file @
3d8eab2f
...
...
@@ -3,7 +3,10 @@ spring:
active
:
local
application
:
name
:
joying-portal
servlet
:
multipart
:
max-file-size
:
1GB
max-request-size
:
10GB
jackson
:
time-zone
:
GMT+8
date-format
:
yyyy-MM-dd HH:mm:ss
...
...
joying-portal/src/main/resources/logback-spring.xml
View file @
3d8eab2f
...
...
@@ -15,6 +15,9 @@
<springProfile
name=
"dev"
>
<property
name=
"LOG_HOME"
value=
"logs"
/>
</springProfile>
<springProfile
name=
"test"
>
<property
name=
"LOG_HOME"
value=
"logs"
/>
</springProfile>
<!-- 彩色日志 -->
...
...
@@ -120,6 +123,11 @@
<appender-ref
ref=
"DOCKER_LOGS"
/>
<appender-ref
ref=
"INFO_FILE"
/>
</springProfile>
<springProfile
name=
"test"
>
<!-- <appender-ref ref="CONSOLE" />-->
<appender-ref
ref=
"DOCKER_LOGS"
/>
<appender-ref
ref=
"INFO_FILE"
/>
</springProfile>
</root>
</configuration>
\ No newline at end of file
sql/joying.sql
View file @
3d8eab2f
...
...
@@ -2,6 +2,27 @@ SET NAMES utf8mb4;
SET
FOREIGN_KEY_CHECKS
=
0
;
-- ----------------------------
-- Table structure for tb_admin
-- ----------------------------
DROP
TABLE
IF
EXISTS
`tb_admin`
;
CREATE
TABLE
`tb_admin`
(
`id`
int
(
11
)
NOT
NULL
AUTO_INCREMENT
,
`username`
varchar
(
32
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NOT
NULL
DEFAULT
''
COMMENT
'用户账号'
,
`nickname`
varchar
(
20
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NOT
NULL
DEFAULT
''
COMMENT
'用户昵称'
,
`password`
varchar
(
255
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NOT
NULL
DEFAULT
''
COMMENT
'密码'
,
`role_id`
int
(
11
)
NOT
NULL
COMMENT
'所属角色id'
,
`create_date`
datetime
(
0
)
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
(
0
),
`update_date`
datetime
(
0
)
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
(
0
),
`create_time`
bigint
(
20
)
NULL
DEFAULT
NULL
,
`update_time`
bigint
(
20
)
NULL
DEFAULT
NULL
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
3
CHARACTER
SET
=
utf8
COLLATE
=
utf8_general_ci
COMMENT
=
'后台管理用户'
ROW_FORMAT
=
Dynamic
;
-- ----------------------------
-- Table structure for tb_auth_enterprise
-- ----------------------------
DROP
TABLE
IF
EXISTS
`tb_auth_enterprise`
;
CREATE
TABLE
`tb_auth_enterprise`
(
...
...
@@ -17,10 +38,11 @@ CREATE TABLE `tb_auth_enterprise`
`bank_branch`
varchar
(
64
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NOT
NULL
DEFAULT
''
COMMENT
'开户支行'
,
`create_date`
datetime
(
0
)
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
,
`update_date`
datetime
(
0
)
NULL
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
(
0
),
`create_time`
bigint
(
20
)
NULL
DEFAULT
NULL
,
`update_time`
bigint
(
20
)
NULL
DEFAULT
NULL
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
,
UNIQUE
INDEX
`idx_userid`
(
`user_id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
1
CHARACTER
SET
=
utf8
COLLATE
=
utf8_general_ci
COMMENT
=
'企业认证信息表'
ROW_FORMAT
=
Dynamic
;
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
2
CHARACTER
SET
=
utf8
COLLATE
=
utf8_general_ci
COMMENT
=
'企业认证信息表'
ROW_FORMAT
=
Dynamic
;
-- ----------------------------
-- Table structure for tb_auth_person
-- ----------------------------
...
...
@@ -35,6 +57,8 @@ CREATE TABLE `tb_auth_person`
`card_picture_back`
varchar
(
255
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NOT
NULL
DEFAULT
''
COMMENT
'身份证反面照片(国徽面)'
,
`create_date`
datetime
(
0
)
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
,
`update_date`
datetime
(
0
)
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
(
0
),
`create_time`
bigint
(
20
)
NULL
DEFAULT
NULL
,
`update_time`
bigint
(
20
)
NULL
DEFAULT
NULL
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
,
UNIQUE
INDEX
`idx_userid`
(
`user_id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
2
CHARACTER
SET
=
utf8
COLLATE
=
utf8_general_ci
COMMENT
=
'个人认证信息表'
ROW_FORMAT
=
Dynamic
;
...
...
@@ -50,10 +74,116 @@ CREATE TABLE `tb_category`
`english_name`
varchar
(
128
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NOT
NULL
DEFAULT
''
,
`create_date`
datetime
(
0
)
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
,
`update_date`
datetime
(
0
)
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
(
0
),
`update_time`
bigint
(
20
)
NULL
DEFAULT
NULL
,
`create_time`
bigint
(
20
)
NULL
DEFAULT
NULL
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
8
CHARACTER
SET
=
utf8
COLLATE
=
utf8_general_ci
COMMENT
=
'首页类目表'
ROW_FORMAT
=
Dynamic
;
-- ----------------------------
-- Records of tb_category
-- ----------------------------
INSERT
INTO
`tb_category`
VALUES
(
1
,
'剧本'
,
'SCRIPT'
,
'2021-07-01 06:28:16'
,
'2021-07-01 06:28:16'
,
NULL
,
NULL
);
INSERT
INTO
`tb_category`
VALUES
(
2
,
'视频'
,
'VIDEO'
,
'2021-07-01 06:29:03'
,
'2021-07-01 06:29:03'
,
NULL
,
NULL
);
INSERT
INTO
`tb_category`
VALUES
(
3
,
'电影'
,
'FILE'
,
'2021-07-01 06:29:20'
,
'2021-07-01 06:29:20'
,
NULL
,
NULL
);
INSERT
INTO
`tb_category`
VALUES
(
4
,
'音频'
,
'AUDIO'
,
'2021-07-01 06:29:42'
,
'2021-07-01 06:29:42'
,
NULL
,
NULL
);
INSERT
INTO
`tb_category`
VALUES
(
5
,
'图片'
,
'PICTURE'
,
'2021-07-01 06:29:58'
,
'2021-07-01 06:29:58'
,
NULL
,
NULL
);
INSERT
INTO
`tb_category`
VALUES
(
6
,
'衍生品'
,
'DERIVATIVE'
,
'2021-07-01 06:30:39'
,
'2021-07-01 06:30:39'
,
NULL
,
NULL
);
INSERT
INTO
`tb_category`
VALUES
(
7
,
'其他'
,
'OTHER'
,
'2021-07-01 06:30:50'
,
'2021-07-01 06:30:50'
,
NULL
,
NULL
);
-- ----------------------------
-- Table structure for tb_collection
-- ----------------------------
DROP
TABLE
IF
EXISTS
`tb_collection`
;
CREATE
TABLE
`tb_collection`
(
`user_id`
int
(
11
)
NOT
NULL
COMMENT
'用户主键'
,
`nft_id`
int
(
11
)
NOT
NULL
COMMENT
'nft主键'
,
PRIMARY
KEY
(
`user_id`
,
`nft_id`
)
USING
BTREE
)
ENGINE
=
InnoDB
CHARACTER
SET
=
utf8
COLLATE
=
utf8_general_ci
ROW_FORMAT
=
Dynamic
;
-- ----------------------------
-- Table structure for tb_label
-- ----------------------------
DROP
TABLE
IF
EXISTS
`tb_label`
;
CREATE
TABLE
`tb_label`
(
`id`
int
(
11
)
NOT
NULL
AUTO_INCREMENT
,
`name`
varchar
(
8
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NOT
NULL
DEFAULT
''
COMMENT
'名称'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
31
CHARACTER
SET
=
utf8
COLLATE
=
utf8_general_ci
ROW_FORMAT
=
Dynamic
;
-- ----------------------------
-- Records of tb_label
-- ----------------------------
INSERT
INTO
`tb_label`
VALUES
(
1
,
'古装'
);
INSERT
INTO
`tb_label`
VALUES
(
2
,
'偶像'
);
INSERT
INTO
`tb_label`
VALUES
(
3
,
'青春'
);
INSERT
INTO
`tb_label`
VALUES
(
4
,
'军旅'
);
INSERT
INTO
`tb_label`
VALUES
(
5
,
'罪案'
);
INSERT
INTO
`tb_label`
VALUES
(
6
,
'历史'
);
INSERT
INTO
`tb_label`
VALUES
(
7
,
'年代'
);
INSERT
INTO
`tb_label`
VALUES
(
8
,
'剧情'
);
INSERT
INTO
`tb_label`
VALUES
(
9
,
'魔幻'
);
INSERT
INTO
`tb_label`
VALUES
(
10
,
'爱情'
);
INSERT
INTO
`tb_label`
VALUES
(
11
,
'言情'
);
INSERT
INTO
`tb_label`
VALUES
(
12
,
'家庭'
);
INSERT
INTO
`tb_label`
VALUES
(
13
,
'喜剧'
);
INSERT
INTO
`tb_label`
VALUES
(
14
,
'谍战'
);
INSERT
INTO
`tb_label`
VALUES
(
15
,
'穿越'
);
INSERT
INTO
`tb_label`
VALUES
(
16
,
'神话'
);
INSERT
INTO
`tb_label`
VALUES
(
17
,
'农村'
);
INSERT
INTO
`tb_label`
VALUES
(
18
,
'奇幻'
);
INSERT
INTO
`tb_label`
VALUES
(
19
,
'动作'
);
INSERT
INTO
`tb_label`
VALUES
(
20
,
'儿童'
);
INSERT
INTO
`tb_label`
VALUES
(
21
,
'武侠'
);
INSERT
INTO
`tb_label`
VALUES
(
22
,
'都市'
);
INSERT
INTO
`tb_label`
VALUES
(
23
,
'战争'
);
INSERT
INTO
`tb_label`
VALUES
(
24
,
'悬疑'
);
INSERT
INTO
`tb_label`
VALUES
(
25
,
'宫廷'
);
INSERT
INTO
`tb_label`
VALUES
(
26
,
'科幻'
);
INSERT
INTO
`tb_label`
VALUES
(
27
,
'商战'
);
INSERT
INTO
`tb_label`
VALUES
(
28
,
'玄幻'
);
INSERT
INTO
`tb_label`
VALUES
(
29
,
'惊悚'
);
INSERT
INTO
`tb_label`
VALUES
(
30
,
'其他'
);
-- ----------------------------
-- Table structure for tb_nft
-- ----------------------------
DROP
TABLE
IF
EXISTS
`tb_nft`
;
...
...
@@ -66,20 +196,23 @@ CREATE TABLE `tb_nft`
`author`
varchar
(
16
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NOT
NULL
COMMENT
'作者'
,
`theme`
varchar
(
255
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NOT
NULL
DEFAULT
''
COMMENT
'题材'
,
`synopsis`
text
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
COMMENT
'简介'
,
`file_name`
varchar
(
32
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
DEFAULT
NULL
COMMENT
'文件名'
,
`file_name`
varchar
(
255
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
DEFAULT
NULL
COMMENT
'文件名'
,
`file_url`
varchar
(
255
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
DEFAULT
NULL
COMMENT
'文件地址--用户选择不存档的情况下为空'
,
`file_hash`
varchar
(
128
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NOT
NULL
DEFAULT
''
COMMENT
'文件上链hash'
,
`is_archives`
tinyint
(
1
)
NOT
NULL
COMMENT
'平台存档 0-不存档 1-加密存档'
,
`is_grant`
tinyint
(
1
)
NOT
NULL
COMMENT
'授权阅读 0-不需要授权 1-需要授权'
,
`nft_id`
varchar
(
64
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NOT
NULL
COMMENT
'nft编号'
,
`nft_hash`
varchar
(
255
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NOT
NULL
COMMENT
'nft哈希'
,
`is_grant`
tinyint
(
1
)
NULL
DEFAULT
NULL
COMMENT
'授权阅读 0-不需要授权 1-需要授权'
,
`nft_id`
varchar
(
64
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NOT
NULL
DEFAULT
''
COMMENT
'nft编号'
,
`nft_hash`
varchar
(
255
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NOT
NULL
DEFAULT
''
COMMENT
'nft哈希'
,
`token_id`
bigint
(
20
)
NULL
DEFAULT
NULL
COMMENT
'nft token'
,
`publish_time`
datetime
(
0
)
NULL
DEFAULT
NULL
COMMENT
'nft发行时间'
,
`is_top`
tinyint
(
1
)
NOT
NULL
DEFAULT
0
COMMENT
'是否置顶 0-否 1-是'
,
`status`
tinyint
(
1
)
NOT
NULL
DEFAULT
0
COMMENT
'0: 下架 1:上架'
,
`create_date`
datetime
(
0
)
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
,
`update_date`
datetime
(
0
)
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
(
0
),
`create_time`
bigint
(
20
)
NULL
DEFAULT
NULL
,
`update_time`
bigint
(
20
)
NULL
DEFAULT
NULL
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
1
CHARACTER
SET
=
utf8
COLLATE
=
utf8_general_ci
ROW_FORMAT
=
Dynamic
;
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
1
2
CHARACTER
SET
=
utf8
COLLATE
=
utf8_general_ci
ROW_FORMAT
=
Dynamic
;
-- ----------------------------
-- Table structure for tb_user
...
...
@@ -92,17 +225,20 @@ CREATE TABLE `tb_user`
`email`
varchar
(
32
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
DEFAULT
NULL
COMMENT
'邮箱'
,
`password`
varchar
(
128
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NOT
NULL
DEFAULT
''
COMMENT
'密码'
,
`wallet`
varchar
(
128
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NOT
NULL
DEFAULT
''
COMMENT
'钱包地址'
,
`nickname`
varchar
(
16
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NOT
NULL
DEFAULT
''
COMMENT
'昵称'
,
`nickname`
varchar
(
20
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NOT
NULL
DEFAULT
''
COMMENT
'昵称'
,
`signature`
varchar
(
128
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NOT
NULL
DEFAULT
''
COMMENT
'个性签名'
,
`avatar`
varchar
(
255
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NOT
NULL
DEFAULT
''
COMMENT
'头像'
,
`auth_type`
tinyint
(
1
)
NULL
DEFAULT
NULL
COMMENT
'认证类型 0-个人认证 1-企业认证'
,
`auth_status`
tinyint
(
1
)
NOT
NULL
DEFAULT
0
COMMENT
'实名认证状态 0-未认证 1-认证成功 2-认证失败 3-认证中'
,
`is_publish`
tinyint
(
1
)
NOT
NULL
DEFAULT
0
COMMENT
'是否发行过nft作品 0-否 1-是'
,
`create_date`
datetime
(
0
)
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
,
`update_date`
datetime
(
0
)
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
(
0
),
`create_time`
bigint
(
20
)
NULL
DEFAULT
NULL
,
`update_time`
bigint
(
20
)
NULL
DEFAULT
NULL
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
,
UNIQUE
INDEX
`idx_telephone`
(
`telephone`
)
USING
BTREE
,
UNIQUE
INDEX
`idx_email`
(
`email`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
10
CHARACTER
SET
=
utf8
COLLATE
=
utf8_general_ci
COMMENT
=
'门户用户表'
ROW_FORMAT
=
Dynamic
;
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
22
CHARACTER
SET
=
utf8
COLLATE
=
utf8_general_ci
COMMENT
=
'门户用户表'
ROW_FORMAT
=
Dynamic
;
SET
FOREIGN_KEY_CHECKS
=
1
;
\ No newline at end of file
FOREIGN_KEY_CHECKS
=
1
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment