-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. 领取奖励后将写入B站账户MID和玩家UUID 2. 玩家登录或换绑账户时记录日志
- Loading branch information
1 parent
b65e89d
commit e82dcd3
Showing
5 changed files
with
185 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
project/core/src/main/kotlin/online/bingzi/bilibili/video/internal/entity/BindLogEntity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
package online.bingzi.bilibili.video.internal.entity | ||
|
||
import com.j256.ormlite.dao.Dao | ||
import com.j256.ormlite.field.DataType | ||
import com.j256.ormlite.field.DatabaseField | ||
import com.j256.ormlite.misc.BaseDaoEnabled | ||
import com.j256.ormlite.table.DatabaseTable | ||
import online.bingzi.bilibili.video.internal.helper.DatabaseHelper | ||
import java.util.* | ||
|
||
/** | ||
* Bind log entity | ||
* <p> | ||
* 绑定日志实体 | ||
* | ||
* @property id 日志ID | ||
* @property playerUUID 玩家UUID | ||
* @property playerName 玩家名称 | ||
* @property bilibiliMid B站账户MID | ||
* @property bilibiliName B站账户名称 | ||
* @property operationType 操作类型(BIND-绑定, CHANGE-换绑, UNBIND-解绑) | ||
* @property oldBilibiliMid 旧B站账户MID(换绑时记录) | ||
* @property oldBilibiliName 旧B站账户名称(换绑时记录) | ||
* @property createTime 创建时间 | ||
* @constructor Create empty Bind log entity | ||
* | ||
* @author BingZi-233 | ||
* @since 2.0.1 | ||
*/ | ||
@DatabaseTable(tableName = "bilibili_video_bind_log") | ||
data class BindLogEntity( | ||
@DatabaseField(generatedId = true) | ||
var id: Int? = null, | ||
@DatabaseField | ||
var playerUUID: UUID? = null, | ||
@DatabaseField | ||
var playerName: String? = null, | ||
@DatabaseField | ||
var bilibiliMid: String? = null, | ||
@DatabaseField | ||
var bilibiliName: String? = null, | ||
@DatabaseField | ||
var operationType: String? = null, | ||
@DatabaseField | ||
var oldBilibiliMid: String? = null, | ||
@DatabaseField | ||
var oldBilibiliName: String? = null, | ||
@DatabaseField( | ||
dataType = DataType.DATE_STRING, | ||
format = "yyyy-MM-ss HH:mm:ss", | ||
columnDefinition = "DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL", | ||
readOnly = true, | ||
canBeNull = false | ||
) | ||
var createTime: Date? = null | ||
) : BaseDaoEnabled<BindLogEntity, Int>() { | ||
init { | ||
dao = DatabaseHelper.bindLogEntityDaoSource | ||
} | ||
|
||
companion object { | ||
fun getDao(): Dao<BindLogEntity, Int> { | ||
return DatabaseHelper.bindLogEntityDaoSource | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters