33 lines
762 B
C#

using ServiceStationContracts.StorageContracts;
using System;
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; }
public int PointCount { get; set; }
public virtual Work _work { get; set; } = new();
public virtual Client _client { get; set; } = new();
public bool Update(WorkClientBindingModel? model) {
if (model == null) {
return false;
}
PointCount += model.Point_count;
return true;
}
}
}