import Realm, { ObjectSchema } from 'realm' import { LoggerStatus, LoggerType } from '../../../enum/softwareEnum' import { MJImageType, MJRobotType } from '../../../enum/mjEnum' export class BrowserMJModel extends Realm.Object { id: string serviceId: string channelId: string mjBotId: string nijBotId: string token: string userAgent: string userAgentCustom: boolean createTime: Date updateTime: Date version: string static schema: ObjectSchema = { name: 'BrowserMJ', properties: { id: 'string', serviceId: 'string', channelId: 'string', mjBotId: 'string?', nijBotId: 'string?', token: 'string', userAgent: 'string', userAgentCustom: 'bool', createTime: 'date', updateTime: 'date', version: 'string' }, // 主键为_id primaryKey: 'id' } } export class RemoteMJModel extends Realm.Object { id: string accountId: string | null channelId: string coreSize: number guildId: string mjBotChannelId: string nijiBotChannelId: string queueSize: number remark: string remixAutoSubmit: boolean timeoutMinutes: number userAgent: string userToken: string createTime: Date updateTime: Date version: string static schema: ObjectSchema = { name: 'RemoteMJ', properties: { id: 'string', accountId: 'string?', channelId: 'string', coreSize: 'int', guildId: 'string', mjBotChannelId: 'string', nijiBotChannelId: 'string', queueSize: 'int', remark: 'string', remixAutoSubmit: 'bool', timeoutMinutes: 'int', userAgent: 'string', userToken: 'string', createTime: 'date', updateTime: 'date', version: 'string' }, // 主键为_id primaryKey: 'id' } } export class APIMjModel extends Realm.Object { id: string mjApiUrl: string mjSpeed: string // MJ出图的速度模式 apiKey: string createTime: Date updateTime: Date version: string static schema: ObjectSchema = { name: 'APIMj', properties: { id: 'string', mjApiUrl: 'string', mjSpeed: 'string', apiKey: 'string', createTime: 'date', updateTime: 'date', version: 'string' }, // 主键为_id primaryKey: 'id' } } export class MjSettingModel extends Realm.Object { id: string type: MJImageType requestModel: MJImageType selectRobot: MJRobotType imageScale: string imageModel: string imageSuffix: string taskCount: number spaceTime: number createTime: Date updateTime: Date version: string static schema: ObjectSchema = { name: 'MjSetting', properties: { id: 'string', type: 'string', requestModel: 'string', selectRobot: 'string', imageScale: 'string', imageModel: 'string', imageSuffix: 'string', taskCount: 'int', spaceTime: 'int', createTime: 'date', updateTime: 'date', version: 'string' }, // 主键为_id primaryKey: 'id' } }