44 lines
1.2 KiB
C#
44 lines
1.2 KiB
C#
using System;
|
|
using _0_Framework.Application;
|
|
using _0_Framework.Domain;
|
|
using CompanyManagment.App.Contracts.AndroidApkVersion;
|
|
|
|
namespace Company.Domain.AndroidApkVersionAgg;
|
|
|
|
public class AndroidApkVersion:EntityBase
|
|
{
|
|
private AndroidApkVersion () { }
|
|
|
|
public AndroidApkVersion( string versionName,string versionCode, IsActive isActive, string path, ApkType apkType, bool isForce = false)
|
|
{
|
|
|
|
VersionName = versionName;
|
|
VersionCode = versionCode;
|
|
IsActive = isActive;
|
|
Path = path;
|
|
ApkType = apkType;
|
|
IsForce = isForce;
|
|
var appName = apkType == ApkType.WebView ? "Gozareshgir-WebView" : "Gozareshgir-FaceDetection";
|
|
Title = $"{appName}-{versionName}-{CreationDate:g}";
|
|
}
|
|
|
|
public string Title { get; private set; }
|
|
public string VersionName{ get; private set; }
|
|
public string VersionCode{ get; private set; }
|
|
public IsActive IsActive { get; private set; }
|
|
public string Path { get; set; }
|
|
public ApkType ApkType { get; private set; }
|
|
public bool IsForce { get; private set; }
|
|
|
|
|
|
public void Active()
|
|
{
|
|
IsActive = IsActive.True;
|
|
}
|
|
|
|
public void DeActive()
|
|
{
|
|
IsActive = IsActive.False;
|
|
}
|
|
}
|