[#48] Billing: Add custom modifiers for members
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				Test / Run tests (push) Successful in 2m21s
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	Test / Run tests (push) Successful in 2m21s
				
			This commit is contained in:
		
							
								
								
									
										31
									
								
								Elwig/Models/Entities/PaymentCustom.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								Elwig/Models/Entities/PaymentCustom.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,31 @@ | ||||
| using Elwig.Helpers; | ||||
| using Microsoft.EntityFrameworkCore; | ||||
| using System.ComponentModel.DataAnnotations.Schema; | ||||
|  | ||||
| namespace Elwig.Models.Entities { | ||||
|     [Table("payment_custom"), PrimaryKey("Year", "MgNr")] | ||||
|     public class PaymentCustom { | ||||
|         [Column("year")] | ||||
|         public int Year { get; set; } | ||||
|  | ||||
|         [Column("mgnr")] | ||||
|         public int MgNr { get; set; } | ||||
|  | ||||
|         [Column("amount")] | ||||
|         public long AmountValue { get; set; } | ||||
|         [NotMapped] | ||||
|         public decimal Amount { | ||||
|             get => Utils.DecFromDb(AmountValue, 2); | ||||
|             set => AmountValue = Utils.DecToDb(value, 2); | ||||
|         } | ||||
|  | ||||
|         [Column("comment")] | ||||
|         public string? Comment { get; set; } | ||||
|  | ||||
|         [ForeignKey("Year")] | ||||
|         public virtual Season Season { get; private set; } = null!; | ||||
|  | ||||
|         [ForeignKey("MgNr")] | ||||
|         public virtual Member Member { get; private set; } = null!; | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user