using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;

namespace YBEE.EQM.Core.SeedData;

/// <summary>
/// 用户种子
/// </summary>
public class SysUserSeedData : IEntitySeedData<SysUser>
{
    /// <summary>
    /// 种子数据
    /// </summary>
    /// <param name="dbContext"></param>
    /// <param name="dbContextLocator"></param>
    /// <returns></returns>
    public IEnumerable<SysUser> HasData(DbContext dbContext, Type dbContextLocator)
    {
        return
        [
            new SysUser { Id = CommonConst.SYS_USER_ID, SysOrgId = 1, Name = "系统用户", Account = "sys", Password = "", IsActivated = true, CreateSysUserId = 1, CreateTime = DateTime.Now, Status = CommonStatus.ENABLE },
            //new SysUser { Id = 2, SysOrgId = 1, Name = "超级管理员", Account = "admin", Password = "5t6QUpK/gc29b2R83PGu/dMBr8qUIkRWpG9dhS85SnI=", IsActivated = true, CreateSysUserId = 1, CreateTime = DateTime.Now, Status = CommonStatus.ENABLE },
            new SysUser { Id = 2, SysOrgId = 1, Name = "超级管理员", Account = "admin", Password = "eqa6HHNRd1uyROxbndDR+A==:oQfe9PHl/WNLtxSNlCXo512AZbb7S0lxurBi5dNw9iI=", IsActivated = true, CreateSysUserId = 1, CreateTime = DateTime.Now, Status = CommonStatus.ENABLE },
        ];
    }
}