# Generated by Django 5.2.12 on 2026-04-30 10:08

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('device_interaction', '0002_device_battery_level_device_brightness_and_more'),
    ]

    operations = [
        migrations.AddField(
            model_name='userdevice',
            name='affinity_level',
            field=models.IntegerField(default=1, help_text='缓存值，由服务端在好感度变化时同步更新', verbose_name='当前等级'),
        ),
        migrations.AddField(
            model_name='userdevice',
            name='favorability',
            field=models.IntegerField(default=10, help_text='设备级好感度，每台设备独立。初始值取自 AffinitySetting.initial_affinity', verbose_name='好感度'),
        ),
        migrations.AddField(
            model_name='userdevice',
            name='is_active',
            field=models.BooleanField(default=True, help_text='软删除标记。解绑置为 false，重绑时可读取历史值。注意：与 Device.is_active（设备激活态）不是同一概念', verbose_name='绑定有效'),
        ),
        migrations.AddField(
            model_name='userdevice',
            name='last_active_at',
            field=models.DateTimeField(blank=True, db_index=True, help_text='用于衰减判断；服务端在每次成功 apply 时刷新', null=True, verbose_name='最近互动时间'),
        ),
    ]
