Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fns_front_2
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenqikuai
fns_front_2
Commits
317308e5
Commit
317308e5
authored
Dec 01, 2021
by
chenqikuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: db version ++
parent
643f3b5d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
33 deletions
+33
-33
index.ts
src/db/index.ts
+33
-33
No files found.
src/db/index.ts
View file @
317308e5
import
Dexie
from
'dexie'
import
Dexie
from
"dexie"
;
import
{
DisplayMessage
}
from
'@/store/messagesStore'
import
{
DisplayMessage
}
from
"@/store/messagesStore"
;
import
{
iContact
,
iContact2
,
iUserinfo
}
from
'@/service/UserService/types'
import
{
iContact
,
iContact2
,
iUserinfo
}
from
"@/service/UserService/types"
;
export
interface
iChatMessage
extends
DisplayMessage
{
export
interface
iChatMessage
extends
DisplayMessage
{
masterId
:
string
// 这条消息展示在谁的页面上
masterId
:
string
;
// 这条消息展示在谁的页面上
}
}
export
interface
iChatListCard
{
export
interface
iChatListCard
{
masterId
:
string
masterId
:
string
;
targetId
:
string
targetId
:
string
;
unreadMsgCount
:
number
unreadMsgCount
:
number
;
content
:
string
content
:
string
;
datetime
:
number
datetime
:
number
;
inChat
:
boolean
// 会话状态,会话中?
inChat
:
boolean
;
// 会话状态,会话中?
isRobootCard
?:
boolean
isRobootCard
?:
boolean
;
isDeleted
?:
boolean
isDeleted
?:
boolean
;
}
}
export
interface
iOutLet
{
export
interface
iOutLet
{
id
:
number
id
:
number
;
name
:
string
name
:
string
;
isDeleted
?:
boolean
isDeleted
?:
boolean
;
}
}
export
class
MyAppDatabase
extends
Dexie
{
export
class
MyAppDatabase
extends
Dexie
{
chatMessage
:
Dexie
.
Table
<
iChatMessage
,
number
>
chatMessage
:
Dexie
.
Table
<
iChatMessage
,
number
>
;
chatListCard
:
Dexie
.
Table
<
iChatListCard
,
number
>
chatListCard
:
Dexie
.
Table
<
iChatListCard
,
number
>
;
contactPerson
:
Dexie
.
Table
<
iContact2
,
number
>
contactPerson
:
Dexie
.
Table
<
iContact2
,
number
>
;
userInfo
:
Dexie
.
Table
<
iUserinfo
,
number
>
userInfo
:
Dexie
.
Table
<
iUserinfo
,
number
>
;
outlet
:
Dexie
.
Table
<
iOutLet
,
number
>
outlet
:
Dexie
.
Table
<
iOutLet
,
number
>
;
constructor
()
{
constructor
()
{
super
(
'MyAppDatabase'
)
super
(
"MyAppDatabase"
);
this
.
version
(
1.
4
).
stores
({
this
.
version
(
1.
5
).
stores
({
chatMessage
:
chatMessage
:
'++id, content, from, uuid, state, uploadProgress, type, datetime, hideDatetime, logid, masterId, readed'
,
"++id, content, from, uuid, state, uploadProgress, type, datetime, hideDatetime, logid, masterId, readed"
,
chatListCard
:
chatListCard
:
'++id, masterId, targetId, unreadMsgCount, content, inChat, isRobootCard,isDeleted'
,
"++id, masterId, targetId, unreadMsgCount, content, inChat, isRobootCard,isDeleted"
,
contactPerson
:
'++id, addr, bank, phone, user_name, out_let_name'
,
contactPerson
:
"++id, addr, bank, phone, user_name, out_let_name"
,
userInfo
:
'++id, created_at, phone, remark, user_name, uuid, addr'
,
userInfo
:
"++id, created_at, phone, remark, user_name, uuid, addr"
,
outlet
:
'id, name, isDeleted'
,
outlet
:
"id, name, isDeleted"
,
})
})
;
this
.
chatMessage
=
this
.
table
(
'chatMessage'
)
this
.
chatMessage
=
this
.
table
(
"chatMessage"
);
this
.
chatListCard
=
this
.
table
(
'chatListCard'
)
this
.
chatListCard
=
this
.
table
(
"chatListCard"
);
this
.
contactPerson
=
this
.
table
(
'contactPerson'
)
this
.
contactPerson
=
this
.
table
(
"contactPerson"
);
this
.
userInfo
=
this
.
table
(
'userInfo'
)
this
.
userInfo
=
this
.
table
(
"userInfo"
);
this
.
outlet
=
this
.
table
(
'outlet'
)
this
.
outlet
=
this
.
table
(
"outlet"
);
}
}
}
}
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