33 lines
762 B
C#
Raw Normal View History

2024-08-20 10:37:39 +04:00
using ServiceStationContracts.StorageContracts;
using System;
2024-08-10 18:43:15 +04:00
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ServiceStationsDataBaseImplement.Models {
public class WorkClient {
public int Id { get; set; }
[Required]
public int WorkId { get; set; }
[Required]
public int ClientId { get; set; }
2024-08-20 10:37:39 +04:00
public int PointCount { get; set; }
2024-08-10 18:43:15 +04:00
public virtual Work _work { get; set; } = new();
public virtual Client _client { get; set; } = new();
2024-08-20 10:37:39 +04:00
public bool Update(WorkClientBindingModel? model) {
if (model == null) {
return false;
}
PointCount += model.Point_count;
return true;
}
}
2024-08-10 18:43:15 +04:00
}