main
Last change
on this file was e90ba32, checked in by ElenaMoskova <elena.moskova99@…>, 3 months ago |
fix issues
fix bugs with nested tables
fix delete nested fk items
|
-
Property mode
set to
100644
|
File size:
1.1 KB
|
Rev | Line | |
---|
[2aea0fd] | 1 | using System;
|
---|
| 2 | using System.Collections.Generic;
|
---|
| 3 | using System.ComponentModel.DataAnnotations;
|
---|
| 4 | using System.ComponentModel.DataAnnotations.Schema;
|
---|
| 5 | using System.Linq;
|
---|
| 6 | using System.Web;
|
---|
| 7 |
|
---|
| 8 | namespace PostgreSqlDotnetCore.Models
|
---|
| 9 | {
|
---|
| 10 | [Table("pet_cares", Schema = "project")]
|
---|
| 11 | public class Pet_CaresClass
|
---|
| 12 | {
|
---|
| 13 | [Key]
|
---|
| 14 | public int id { get; set; }
|
---|
| 15 |
|
---|
| 16 | // [Required(ErrorMessage = "The customer name is required")]
|
---|
| 17 | public string title { get; set; }
|
---|
| 18 | //[Required(ErrorMessage = "The customer lastname is required")]
|
---|
| 19 | public string description { get; set; }
|
---|
| 20 | public DateTime dateending { get; set; }
|
---|
[ae6c071] | 21 |
|
---|
| 22 | public DateTime start_date { get; set; }
|
---|
| 23 |
|
---|
[e90ba32] | 24 | [ForeignKey("PetsClass")]
|
---|
| 25 | [Column("pet_id")]
|
---|
[e9bb9d1] | 26 | public int pet_id { get; set; }
|
---|
[e90ba32] | 27 | public PetsClass PetsClass { get; set; }
|
---|
[e9bb9d1] | 28 |
|
---|
| 29 |
|
---|
[ae6c071] | 30 | public void SetDatesToUtc()
|
---|
| 31 | {
|
---|
| 32 | dateending = DateTime.SpecifyKind(dateending, DateTimeKind.Utc);
|
---|
| 33 | start_date = DateTime.SpecifyKind(start_date, DateTimeKind.Utc);
|
---|
| 34 | }
|
---|
[2aea0fd] | 35 | public int usersid { get; set; }
|
---|
| 36 | public int vetcentersid { get; set; }
|
---|
| 37 |
|
---|
| 38 |
|
---|
| 39 | }
|
---|
| 40 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.