changes
This commit is contained in:
23
Models/Tree.cs
Normal file
23
Models/Tree.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace public_valetax.Models
|
||||
{
|
||||
[Table("trees")]
|
||||
public class Tree
|
||||
{
|
||||
[Key]
|
||||
[Column("id")]
|
||||
public long Id { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("name")]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
[Column("created_at")]
|
||||
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
||||
|
||||
// Navigation property
|
||||
public ICollection<Node> Nodes { get; set; } = [];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user