23 lines
554 B
C#
23 lines
554 B
C#
|
|
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; } = [];
|
||
|
|
}
|
||
|
|
}
|