source: PostgreSqlDotnetCore/Models/ProductsClass.cs

main
Last change on this file was 2639fab, checked in by ElenaMoskova <elena.moskova99@…>, 3 months ago

Update with triggers

  • Property mode set to 100644
File size: 847 bytes
Line 
1using System;
2using System.Collections.Generic;
3using System.ComponentModel.DataAnnotations;
4using System.ComponentModel.DataAnnotations.Schema;
5using System.Linq;
6using System.Web;
7
8namespace PostgreSqlDotnetCore.Models
9{
10 [Table("products", Schema = "project")]
11 public class ProductsClass
12 {
13 [Key]
14 public int id { get; set; }
15
16 [Required(ErrorMessage = "The product name is required")]
17 public string name { get; set; }
18 public string description { get; set; }
19 public string price { get; set; }
20 public bool isactive { get; set; }
21 //public DateTime dateadded { get; set; }
22
23 public DateOnly dateadded { get; set; } = DateOnly.FromDateTime(DateTime.UtcNow);
24 public string category { get; set; }
25
26 public int available_quantity { get; set; }
27
28
29 }
30}
Note: See TracBrowser for help on using the repository browser.